Failed to restart docker.service: Unit docker.socket failed to load: No such file or directory

找不到docker.socket解决方法

错误信息:

Failed to restart docker.service: Unit docker.socket failed to load: No such file or directory

解决办法:(CentOS 7)

vi /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

即可。

你可能感兴趣的:(docker,docker)