0

if I try to pull a docker it gives me this output

Using default tag: latest
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.24/images/create?fromImage=homeassistant%2Fhome-assistant&tag=latest: dial unix /var/run/docker.sock: connect: permission denied

im a noob at ubuntu so please explain the fix for dummies

also maybe it has something to do with this

How do i reset my networkconfig

that was a question from I followed the first answer :)

2 Answers2

1

It says you don't have permission to connect to the socket unix:///var/run/docker.sock

Simply, to provide permission you can do:

    sudo chown $USER /var/run/docker.sock

Then continue with your other docker commands like docker pull hello-world

If you want don't want to type sudo before every docker command, you might want to add the currently logged-in user to the docker group:

    sudo usermod -aG docker ${USER}

Then you will need to log out and log in back to apply the new group membership.Now you should be able to run docker commands without sudo as well.

Hope that helps.

0

For this issue, you could find the same answer & resolution on: docker_permission_issue