Open dkebler opened 5 years ago
When the host directory is mounted into the container, the contents of the host directory override the contents of the container directory, so if the host's /mnt/data/emqx
directory is empty, an error is reported.
what if I just want to persistent my configurations in case of container restarting? but don't want to prepare those files myself (want to use container default ones)
Expected behavior
should allow bind mount of /opt/emqx/etc/
Actual behavior
emqx fails to launch because it can't find the /etc directory
I would like to set and persist /etc on my host machine
running 3.2.beta2 with
docker run -dit --restart always --name emqx-mqtt-broker -v /mnt/data/emqx:/opt/emqx/etc -p 18083:18083 -p 1883:1883 emqx/emqx:latest
but if I do a
docker logs --tail 50 --follow --timestamps emqx-mqtt-broker
I see multiple errors where emqx can't find the etc files. Looks like creating that external bindmount volume keeps emqx from finding opt/emqx/etc folder. emqx runs fine without the volume bindmount
https://github.com/emqx/emqx-docker/issues/115 Don't know if this is still a bug or simply your dockerfile doesn't support making this bind mount volume. Either way it should otherwise how can one customize emqx.