[root@linux ~]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since 六 2023-11-18 13:00:51 CST; 2min 51s ago
Docs: https://docs.docker.com
Process: 2628 ExecStart=/usr/bin/dockerd --registry-mirror=<your accelerate address> --registry-mirror=<your accelerate address> -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 2628 (code=exited, status=1/FAILURE)
11月 18 13:00:49 linux systemd[1]: docker.service failed.
11月 18 13:00:51 linux systemd[1]: docker.service holdoff time over, scheduling restart.
11月 18 13:00:51 linux systemd[1]: Stopped Docker Application Container Engine.
11月 18 13:00:51 linux systemd[1]: start request repeated too quickly for docker.service
11月 18 13:00:51 linux systemd[1]: Failed to start Docker Application Container Engine.
11月 18 13:00:51 linux systemd[1]: Unit docker.service entered failed state.
11月 18 13:00:51 linux systemd[1]: docker.service failed.
11月 18 13:00:51 linux systemd[1]: start request repeated too quickly for docker.service
11月 18 13:00:51 linux systemd[1]: Failed to start Docker Application Container Engine.
11月 18 13:00:51 linux systemd[1]: docker.service failed.
Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[root@linux ~]# systemctl restart docker
Warning: docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@linux ~]# systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
出现以上错误时,需要如下配置即可解决
需要进入如下目录:vim /etc/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=11.0.1.10
# --insecure-registry的值修改为自己本机(虚拟机)IP
最后启动docker
[root@linux ~]# systemctl daemon-reload
[root@linux ~]# systemctl restart docker