Docker启动过程中常见错误解决
Posted alextongtong
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Docker启动过程中常见错误解决相关的知识,希望对你有一定的参考价值。
错误:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
如果在Centos7上执行:
systemctl daemon-reload
sudo service docker restart
报出新的错误:
Redirecting to /bin/systemctl restart docker.service
Failed to restart docker.service: Unit not found.
解决方式:
缺少了如下的文件:/usr/lib/systemd/system/docker.socket
[Unit]
Description=Docker Socket for the API
PartOf=docker.service
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target
添加后执行
systemctl daemon-reload
systemctl start docker.socket
systemctl start docker
以上是关于Docker启动过程中常见错误解决的主要内容,如果未能解决你的问题,请参考以下文章
Docker&Kubernetes ❀ Kubernetes集群安装部署过程与常见的错误解决方法