Cannot connect to the Docker daemon at unix:///var/run/docker.sock

In this article, we will see the solution for Cannot connect to the Docker daemon at unix:///var/run/docker.sock.

Cannot connect to the Docker daemon at unix

The above error received when tried to run command against Docker on Linux.

Reason and Solution:
Reason is docker service stopped. Lets verify Docker is started or not.

sudo systemctl status docker

Its stopped.

Solution is we have to enable to start the Docker service and start. If docker service is enabled, whenever Linux machine restarted Docker service will started automatically.

sudo systemctl enable docker

Now, start the docker service.

sudo systemctl start docker

Now run any docker command.

So, error not observed.

Leave a Reply

Your email address will not be published. Required fields are marked *