I am working through this tutorial setting up Docker, and I'm finding that all of their examples are written like
docker run hello-world
but when I try it, it says permission denied on a socket and I have to do
sudo docker run hello-world
to run the examples. Why are root privileges necessary even for these simple examples?
Running a docker container requires the user to be a member of the docker
group. By default, when you install docker, the only user that is added to it is root
. You can add your own user to this group if you want to run docker containers from it.