Quantcast
Channel: Chaminda's DevOps Journey with MSFT
Viewing all articles
Browse latest Browse all 344

Resolve " 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.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied"

$
0
0

While setting up docker on Ubuntu 20.04 you might run into below issue permission denied error is shown while trying to execute any docker command.

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.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied


To fix the issue in execute below two commands and docker in your Ubuntu 20.04 machine will run  just fine.


 sudo chmod 666 /var/run/docker.sock

sudo setfacl --modify user::rw /var/run/docker.sock



Viewing all articles
Browse latest Browse all 344

Trending Articles