0

After installing docker engine using the documentation on Docker Official Docs site.

An attempt to test the installation using the instruction from the install instruction page returned an error below:

(base) user@localmachine:~$ sudo docker run hello-word

Unable to find image 'hello-word:latest' locally docker: Error response from daemon: pull access denied for hello-word, repository does > not exist or may require 'docker login': denied: requested access to the resource is > > denied. See 'docker run --help'.

From investigation, it appears this looks like a permission issue, I'm already aware that there is a new permission group called docker; guessing that my user account need to be added to the group as a sub-group permission.

UPDATE When I also run command: ````docker info. I get this error Got this permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied``` at the base of the returned result, I get some server error and only a small part of the result is returned.

Any help from here...?

1 Answer 1

0

Having combed the web, I found a solution that worked; I saw the solution on digital ocean community site https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket

These two command below worked for the two issues: sudo chmod 666 /var/run/docker.sock & sudo usermod -aG docker ubuntu_username

2
  • 1
    It shouldn't be necessary to change the permissions if you add the user to the Docker group. Did you follow the guide for the post-installation steps too? Jul 18, 2022 at 7:21
  • What happened precisly was that, from my question above, you would observe that there are two errors. The first error was cleared by adding the user to the docker group, but not the second error that's coming from the partial return of the docker info result. Hence, why I needed the second permissions command. Jul 18, 2022 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .