Docker ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [How to Solve]

I turned on centos7 today. Since I did not set the boot-up self-start, when I started docker, I found that docker-related commands would report errors. Baidu has said that I have tried reinstalling docker, but I still can’t solve the problem. Post a set of questions:

1. For example, I check the version information




2. Restart the container




3. Systemctl status docker Checking the docker status also found an error:




The final solution to the problem is:
1. Enter /etc/docker and create a new one without a daemon.json file:

cd /etc/docker

2. Edit the daemon.json file:
add this code:

“registry-mirrors”: [“”]


3. Then restart docker:

systemctl restart docker.service

Similar Posts:

Leave a Reply

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