Open 1e0ng opened 8 years ago
The docker daemon needs to do a lot of things which really require root rights.
Running containers (and applications) with Docker implies running the Docker daemon. This daemon currently requires root privileges, and you should therefore be aware of some important details.
If you just use docker-compose up
, do you get errors? In my environment, it just works. Yes, the docker daemon currently requires root privilege, but the docker-compose is kind of some clients of the docker daemon, it doesn't need root
privilege.
Ubuntu 14.04.4 LTS
Run docker-compose up
without sudo gets:
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
docker-compose
is a set of python scripts, create containers will call docker run
actually.
What is your operating system?
The examples in the README assume that your are in production, usually Linux, not OS X.
Are there any evidence to prove that the user is not root in the official guide?
I know docker containers can be created without sudo in OS X, but it depends on a VM. Maybe you should check out the user privileges of docker deamon in your VirtualBox.
Yes, the $
sign is an evidence. Note the official guid use the $
sign, which means it's not a root user. If it's a #
sign, it means a root user.
Hi, I noticed the following command is prefixed with
sudo
. It seems not good to useroot
privilege. Actually in the docker container, you can getroot
access, so no need to give it host'sroot
privilege. Agree?