[root@test run]# systemctl start docker
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
To force a start use "systemctl reset-failed docker.service" followed by "systemctl start docker.service" again.
[root@test run]#
[root@test run]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Sat 2021-09-16 14:10:34 CST; 50s ago
Docs: https://docs.docker.com
Process: 1101 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 1101 (code=exited, status=1/FAILURE)
Sep 16 14:10:32 test systemd[1]: docker.service failed.
Sep 16 14:10:34 test systemd[1]: docker.service holdoff time over, scheduling restart.
Sep 16 14:10:34 test systemd[1]: Stopped Docker Application Container Engine.
Sep 16 14:10:34 test systemd[1]: start request repeated too quickly for docker.service
Sep 16 14:10:34 test systemd[1]: Failed to start Docker Application Container Engine.
Sep 16 14:10:34 test systemd[1]: Unit docker.service entered failed state.
Sep 16 14:10:34 test systemd[1]: docker.service failed.
Sep 16 14:11:12 test systemd[1]: start request repeated too quickly for docker.service
Sep 16 14:11:12 test systemd[1]: Failed to start Docker Application Container Engine.
Sep 16 14:11:12 test systemd[1]: docker.service failed.
[root@test run]#
在docker里面启用镜像加速或者搭建Registry私有仓库修改客户端上docker配置时,我们会去修改daemon.json文件,但是有的时候会出现镜像不能重启,问题可能就出现在你刚刚添加的字段格式或者字段上面。这时候重新进去编辑一下确保你输入的准确,就可以实现docker重启。不要想着去更改文件的后缀,这样的话加速可能就会不支持。格式:
{
"registry-mirrors": ["镜像加速地址1", "镜像加速地址2", "镜像加速地址3"]
"insecure-registries": ["仓库IP:端口号 "]
}
[root@test run]#vim /etc/docker/daemon.json
[root@test run]#systemctl start docker
[root@test run]#