Tutorials / Tech blog / Geek Zone

Latest Posts

Tuesday, February 11, 2020

Docker Error - Got permission denied while trying to connect to the Docker daemon socket



Post Docker installation, you may face the following error if you execute Docker commands without "sudo".


docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:
Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/create: dial unix /var/run/docker.sock: connect: permission denied.

Following steps will help resolve this issue

Create the docker group & add your user
  • Create the docker group.
sudo groupadd docker

  • Add your user to the docker group.
sudo usermod -aG docker ${USER}


You might need to log out and log back in so that your group membership is re-evaluated

No comments:

Post a Comment