欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

service docker start 报错 :Failed to start docker.se

程序员文章站 2022-07-10 20:22:26
...

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

解决办法:

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

转载于:https://blog.51cto.com/michaelkang/2160169