You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble using a mounted docker socket in a container on MacOS when the containers docker user can't be root. I mount in the docker socket at /var/run/docker.sock:/var/run/docker.sock and when the socket gets mounted into the container it has the following permissions.
I've tried adding the user both to the root and ssh group where I'm still getting dial unix /var/run/docker.sock: connect: permission denied. If I run chmod 777 /var/run/docker.sock from inside the container as the root user then I am able to use docker commands without appending sudo.
Can anyone guide me to a way where I don't have to use sudo/root or chmod 777 to use the docker socket from inside the container? Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey all,
I'm having trouble using a mounted docker socket in a container on MacOS when the containers docker user can't be root. I mount in the docker socket at
/var/run/docker.sock:/var/run/docker.sock
and when the socket gets mounted into the container it has the following permissions.I've tried adding the user both to the root and ssh group where I'm still getting
dial unix /var/run/docker.sock: connect: permission denied
. If I run chmod 777 /var/run/docker.sock from inside the container as the root user then I am able to use docker commands without appending sudo.Can anyone guide me to a way where I don't have to use sudo/root or chmod 777 to use the docker socket from inside the container? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions