Переглянути джерело

readme: document setup & usage via docker & docker-compose

Fabian Peter Hammerle 4 роки тому
батько
коміт
1da9927967
1 змінених файлів з 16 додано та 0 видалено
  1. 16 0
      README.md

+ 16 - 0
README.md

@@ -39,3 +39,19 @@ $ mosquitto_pub -h MQTT_BROKER -t intertechno-cc1101/12345678/0/set -m ON
 ```
 
 ⚠️ Support for TLS is not implemented yet. Do not connect to brokers via unprotected networks (e.g., internet, wifi network).
+
+## Docker 🐳
+
+```sh
+$ sudo docker build -t intertechno-cc1101-mqtt .
+$ sudo docker run --name intertechno_cc1101_mqtt \
+    --read-only --cap-drop ALL --security-opt no-new-privileges \
+    --device /dev/spidev0.0 intertechno-cc1101-mqtt \
+    intertechno-cc1101-mqtt --mqtt-host HOSTNAME_OR_IP_ADDRESS …
+```
+
+### Docker Compose 🐙
+
+1. Clone this repository.
+2. Adapt `command` in `docker-compose.yml`.
+3. `sudo docker-compose up --build`