安装Docker启动失败,A dependency job for docker.service failed.

2024-01-08 17:48:57 浏览数 (1)

安装Docker后,启动失败,报错如下:

代码语言:javascript复制
[root@st01015vm192 ~]# sudo service docker start
Redirecting to /bin/systemctl start docker.service
A dependency job for docker.service failed. See 'journalctl -xe' for details.
[root@st01015vm192 ~]# sudo service docker status
Redirecting to /bin/systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://docs.docker.com

Apr 21 14:21:28 st01015vm192 systemd[1]: Dependency failed for Docker Application Container Engine.
Apr 21 14:21:28 st01015vm192 systemd[1]: Job docker.service/start failed with result 'dependency'.
Apr 21 14:22:00 st01015vm192 systemd[1]: Dependency failed for Docker Application Container Engine.
Apr 21 14:22:00 st01015vm192 systemd[1]: Job docker.service/start failed with result 'dependency'.

先排除防火墙与SELinux已关闭

代码语言:javascript复制
[root@st01015vm192 ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)
[root@st01015vm192 ~]# sestatus  
SELinux status:                 disabled

给 系统添加一个docker组

代码语言:javascript复制
[root@st01015vm192 ~]#  groupadd docker
groupadd: cannot open /etc/group

做过基线配置 没有权限 使用 chattr -i 增加一下权限

代码语言:javascript复制
[root@st01015vm192 ~]# chattr -i /etc/group
[root@st01015vm192 ~]#  groupadd docker
[root@st01015vm192 ~]# systemctl enable docker  && systemctl start docker

参考资料 https://www.jianshu.com/p/38831a8a47cb

0 人点赞