Docker Community Forums

Share and learn in the Docker community.

/usr/bin/docker permissions

Hey guys.

In terms of best practices and security, is it okay to change the permissions of the /usr/bin/docker and /var/run/docker?

We have a container that needs to execute docker commands. We bind mount the /usr/bin/docker and /var/run/docker.socket, instead of installing docker into the container.

But, the problem is that those folders have permissions set only for the root user to rwx.

The only problem is that the user we need to add, is a user that’s inside the container.

So the container makes this user. Is there anyway to reference this user to the host machine?