centos 新装 docker 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Record it:

Docker installed on the new Centos, after running docker pull 拉镜像 ,

报错:  Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Meaning that a service is not turned on.

 

Solving steps:

$ Systemctl daemon-reload (reload the configuration file for a service, a new service if installed, attributed to systemctl management, service if the new service configuration file to take effect, you need to reload.)
$ Sudo Service docker restart (reboot docker )
$ sudo Service Docker status (should see a status of: running)

 

 

Now you can normally pull up and run.

 

Reference article:

1 https://www.cnblogs.com/forturn/p/9371841.html

2, https://www.cnblogs.com/brucewhite/p/11608853.html

Guess you like

Origin www.cnblogs.com/runshulan/p/12456162.html