Docker Community Forums

Share and learn in the Docker community.

Redirect folders/files

I am using Domoticz and trying to integrate MQTT Broker (Mosquitto) and Zigbee2MQTT
I am struggling a lot with containers and configs, so I am trying to understand how things relate to each other.

Start with small things first.

I have created some folders (not in the container but on the host (Pi)) for mosquitto, like:


inside the config folder I created a file mosquitto.conf and put the following content in it:

persistence true
persistence_location /docker/mosquitto/data

log_dest file /docker/mosquitto/log/mosquitto.log

listener 1883
allow_anonymous false
password_file /mosquitto/config/passwd

How do i get the application to use the created folders and the config file ?

Without seeing how you set up the containers: did you read about bind mounts? See the Get Started: Use bind mounts | Docker Documentation. (You may want to start with part 1 of that Get Started rather than jumping in to part 6.)