A dependency job for docker.service failed

After installing docker, the startup fails with the following error:

[[email protected] ~]# sudo service docker start
Redirecting to /bin/systemctl start docker.service
A dependency job for docker.service failed. See 'journalctl -xe' for details.
[[email protected] ~]# 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'.

First exclude that firewall and SELinux are closed

[[email protected] ~]# 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)
[[email protected] ~]# sestatus  
SELinux status:                 disabled

Add a docker group to the system

[[email protected] ~]#  groupadd docker
groupadd: cannot open /etc/group

After baseline configuration, I don’t have permission to use chattr – I to add permission

[[email protected] ~]# chattr -i /etc/group
[[email protected] ~]#  groupadd docker
[[email protected] ~]# systemctl enable docker  && systemctl start docker

[br] https://www.jianshu.com/p/38831a8a47cb

Similar Posts: