错误信息
Failed to restart docker.service: Unit docker.socket failed to load: No such file or directory
解决方法
vim /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 unmask docker.service
systemctl unmask docker.socket
service docker restart
ps:
遇到Docker: How to fix “Job for docker.service failed because the control process exited with error code”使用sudo dockerd --debug
查看docker错误信息