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?

执行了systemctl daemon-reload 可以了,但是接着执行sudo service docker restart又报下面的错误“

Failed to start docker.service: Unit docker.service not found.

然后我又重启了Ubuntu,这次我不在Moba连接的session里操作了,我直接在Ubuntu里执行sudo docker ps -a,结果又好了!!
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

再通过Moba session连上Ubuntu

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

上一篇:如何给脚本写一个守护进程?


下一篇:如何看到守护daemon进程的标准输出log