In this article, we will see the solution for Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
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.