docker中“Cannot connect to the Docker daemon at ………….Is the Docker daemon running?” 解决办法

#1、在docker拉取镜像后启动不起来

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

docker中“Cannot connect to the Docker daemon at .............Is the Docker daemon running?” 解决办法

此错误的原因包括:

(1)The Docker daemon is not running. Docker守护程序未运行

(2)Docker doesn’t shutdown cleanly. Docker无法完全关闭。

(3)Lack of root privileges to start the docker service. 缺少启动docker服务的root权限。

解决方案:

方法一:查看 /var/run/docker.dock 文件是否变成目录,如果是就删除该目

rm -rf /var/run/docker.sock/

然后重启docker

systemctl restart docker

方法二:检查docker是否在运行

systemctl status docker

如果 Docker 未运行,你可以使用以下命令启动 Docker 服务

systemctl start docker

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://net2asp.com/07276911ef.html