After installing docker, the startup fails with the following error:
[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'.
First exclude that firewall and SELinux are closed
[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
Add a docker group to the system
[root@st01015vm192 ~]# groupadd docker
groupadd: cannot open /etc/group
After baseline configuration, I don’t have permission to use chattr – I to add permission
[root@st01015vm192 ~]# chattr -i /etc/group
[root@st01015vm192 ~]# groupadd docker
[root@st01015vm192 ~]# systemctl enable docker && systemctl start docker
[br] https://www.jianshu.com/p/38831a8a47cb