skip to Main Content

i am trying to build my docker container but it is showing this issue.

abdullahshahid@fedora:~/Documents/hello$ docker build -t hello .
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
abdullahshahid@fedora:~/Documents/hello$

yesterday the image file was creating while today while i have started working on project again it is showing this error.

2

Answers


  1. Have you checked whether your docker demon is running or not?
    Use the below command to check:

    systemctl status docker
    

    If it’s not running then start it using the below command:

    sudo systemctl start docker
    
    Login or Signup to reply.
  2. If the docker daemon is running, check your user is in docker group and if it’s not

    sudo usermod -aG docker $USER
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search