docker执行restart命令时报错:Job for docker.service failed because start of the service was attempted too of

项目场景:

在centos7中安装好docker后,配置了国内的镜像源,然后重启docker时报以下错误。

sudo systemctl restart docker

问题描述

执行重启命令后报错,如下:

[root@localhost docker]# sudo systemctl restart 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.

解决方案:

在daemon.json同级目录下生成daemon.conf文件再重启即可解决

mv /etc/docker/daemon.json /etc/docker/daemon.conf

猜你喜欢

转载自blog.csdn.net/G_whang/article/details/142848272