Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

Hi, while pulling the image 'ubuntu' from docker hub, it gives error "Permission denied" as mentioned below. Kindly resolve

ubuntu@ip-172-31-44-140:~$ docker --version
Docker version 18.09.7, build 2d0083d
ubuntu@ip-172-31-44-140:~$ ^C
ubuntu@ip-172-31-44-140:~$  docker pull ubuntu
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.39/images/create?fromImage=ubuntu&tag=latest: dial unix /var/run/docker.sock: connect: permission denied

1 Answer

0 votes
by (50.2k points)
Kindly run the command as a root user or run with sudo in front of the command that will work for you.
sudo docker pull ubuntu 
For more information refer to this Docker Tutorial

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...