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

大概是docker容器设置restart-allways,然后重启Linux虚拟机后,发现很多进程。

但是这时候docker ps 就会报错

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

 

 

解决方法就是,需要reload 一下 daemon,然后restart docker,执行下面的两个命令

systemctl daemon-reload

systemctl restart docker.service

然后docker ps 发现可以了

 

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

 

上一篇:一个shell脚本实现应用启动|停止|重启|查看状态


下一篇:测试开发CICD——Docker——如何修改 docker 容器的启动参数