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

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

执行docker的命令时出现上面问题。

原因:此时已确定Docker本身已经安装正常。 问题原因是因为docker服务没有启动,所以在相应的/var/run/ 路径下找不到docker的进程。

执行:service docker start    或 systemctl enable docker(开机自启)

启动docker服务,返回docker start/running, process 2662

此时进程启动成功

posted @ 2024-07-23 10:27  三驾马车  阅读(5)  评论(0编辑  收藏  举报