[Solved] Can’t connect with the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon operating?


In case you get the next error when attempting to run a Docker container:

Can't connect with the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon operating?

Then you’ll be able to resolve it by operating the next:

systemctl begin docker

If this doesn’t work due to a root consumer problem, then you are able to do the next first:

gpasswd -a $USER docker

Further points?

Challenge 1

You probably have tried the above, and get this error:

Failed to start out docker.service: Unit docker.service is masked.

Then you’ll be able to clear up it as follows:

systemctl unmask docker.service
systemctl unmask docker.socket
systemctl begin docker.service

Challenge 2

You possibly can nonetheless can’t get round this, then attempt to use the docker daemon service itself:

sudo dockerd

Leave a Reply