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

If you are getting an error “Cannot connect to the Docker daemon at unix:/var/run/docker.sock”, make sure your docker service is running.

Check the current status of the docker service:

If the docker service is in a stopped state, start it:

Note: if you get an error “Failed to start docker.service: Unit docker.service is masked”, you need to unmask the docker service first before trying to start.

Unmask the docker service:

You can also try to restart the docker service and see if it works.

Leave a Reply