Docker Community Forums

Share and learn in the Docker community.

Resolved - Mounting Docker.sock not working


(Eserenity) #1

Hello,

I try to create my first container: nginx-proxy

When I deploy it, I have the error :
ERROR: you need to share your Docker host socket with a volume at /tmp/docker.sock
Typically you should run your jwilder/nginx-proxy with: -v /var/run/docker.sock:/tmp/docker.sock:ro

There is my volumes configuration in docker cloud :

Path - Host path - Writable
/var/run/docker.sock /tmp/docker.sock ro
/etc/nginx/certs /home/test/certs rw
/var/cache/nginx /home/test/nginx rw

The node is a ubuntu and the agent was installed as root.

Any ideas ?


(Eserenity) #2

It’s working :

Need to use the volume /var/run/docker.sock instead of /tmp/docker.sock
Need to change the image unix variable to /var/run/docker.sock