Attempting to run the docker image https://hub.docker.com/_/eclipse-mosquitto/ on docker on my Synology using sudo docker run -it -p 1883:1883 -p 9001:9001 -v mosquitto.conf:/mosquitto/config/mosquitto.conf -v /mosquitto/data -v /mosquitto/log eclipse-mosquitto I get the error: docker: Error response from daemon: readdirent: not a directory.
I'm relying on others for docker support - any suggestions?
I have the same problem
Me and one another colleague have the same problem! We are using the docker for mac.
Seeing the same thing on debian jessie.
Something is messed up with -v flag. If you don't need custom configs simply remove the flag:
sudo docker run -it -p 11883:1883 -p 9001:9001 eclipse-mosquitto
If you need, do the following:
/mosquitto/config/, /mosquitto/data/, /mosquitto/log/ dirs on your host machinemosquitto.config in /mosquitto/config/. Don't forget about those options in config:persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
Now just simply execute
# Notice that mosquitto is exposed on 11883 on host
sudo docker run -it -p 11883:1883 -p 9001:9001 -v /mosquitto/:/mosquitto/ eclipse-mosquitto
It all worked on a fresh Ubuntu Server 16.10 vm.
OK working thanks!
I hit the same problem.
I copied the example from https://hub.docker.com/_/eclipse-mosquitto/, so
I was running -v mosquitto.conf:/mosquitto/config/mosquitto.conf:ro which failed. Changed it to -v $(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro and it's working.
Maybe update the docker hub readme file?
The readme now notes that you need an absolute path to the config file, so I'm closing this. Thanks for the report!
Most helpful comment
I hit the same problem.
I copied the example from https://hub.docker.com/_/eclipse-mosquitto/, so
I was running
-v mosquitto.conf:/mosquitto/config/mosquitto.conf:rowhich failed. Changed it to-v $(pwd)/mosquitto.conf:/mosquitto/config/mosquitto.conf:roand it's working.Maybe update the docker hub readme file?