docker: Got permission denied while trying to connect to the Docker daemon socket.
-
Trying to run commands as a normal user after installing docker, you will see this message, only root is allow to run docker commands by default.
To resolve this issue, you can add your user to the docker linux group, by running the following command.
$ sudo usermod -a -G docker <your_user_name>
You cannot just open a new terminal window and expect it to work, logout and log back in make sure you user is part of the docker group
$ groups adm cdrom sudo docker
Test using the following.
$ docker top help
If you see the following it worked!
$ docker top --help Usage: docker top CONTAINER [ps OPTIONS] Display the running processes of a container Options: --help Print usage
© Lightnetics 2024