Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied
Does this error look familiar?
What is happening is that docker client is communicating with the engine using socket file. As docker service is launched using root user and socket file is accessible to every user in “docker” group, you will not be able to connect to this file from docker client executed launched with your current user access.
2 possible solutions:
sudo docker ps
sudo usermod -a -G docker $USER
Publish Date: 2019-06-13