docker报错处理: Failed to start Dock
2021-04-24 本文已影响0人
青纹刀狼
今天发现docker起不来了,看了下docker状态,发现这个报错
[root@localhost multi-user.target.wants]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2021-04-23 20:40:26 EDT; 21s ago
Docs: https://docs.docker.com
Process: 2423 ExecStart=/usr/bin/dockerd (code=exited, status=1/FAILURE)
Main PID: 2423 (code=exited, status=1/FAILURE)
Apr 23 20:40:25 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 23 20:40:25 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Apr 23 20:40:25 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Apr 23 20:40:25 localhost.localdomain systemd[1]: docker.service failed.
Apr 23 20:40:26 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
Apr 23 20:40:26 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
Apr 23 20:40:26 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Apr 23 20:40:26 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Apr 23 20:40:26 localhost.localdomain systemd[1]: docker.service failed.
报错如下:
![](https://img.haomeiwen.com/i15569140/638cdaac1f68afb5.png)
解决报错:
1.你安装了docker,发现这个报错,先使用systemctl start docker.service把docker服务搞起来,之后才能restart
2.修改配置文件/etc/docker/daemon.json,要注意格式缩进可以,但是不能出现空格
格式如下:
{
"registry-mirrors": ["http://hub-mirror.c.163.com"],
"data-root": "/haha"
}
![](https://img.haomeiwen.com/i15569140/8a13e04b5bd8dff0.png)