Add mosquitto/text

This commit is contained in:
2026-01-31 12:58:43 +00:00
parent 9e62282a1c
commit 717970bceb

14
mosquitto/text Normal file
View File

@@ -0,0 +1,14 @@
$ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" -v "$PWD/mosquitto/data:/mosquitto/data" -v "$PWD/mosquitto/log:/mosquitto/log" eclipse-mosquitto
When running the image, the default configuration values are used. To use a custom configuration file, create your mosquitto.conf in $PWD/mosquitto/config/mosquitto.conf, then mount the config directory to /mosquitto/config.
$ docker run -it -p 1883:1883 -v "$PWD/mosquitto/config:/mosquitto/config" eclipse-mosquitto
Configuration can be changed to:
persist data to /mosquitto/data
log to /mosquitto/log/mosquitto.log
i.e. add the following to mosquitto.conf:
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log