Jelajahi Sumber

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

Fabian Peter Hammerle 4 tahun lalu
induk
melakukan
1da9927967
1 mengubah file dengan 16 tambahan dan 0 penghapusan
  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`