docker启动报错:Failed to start Docker Application Container Engine.
今天docker启动报错:
4月 20 20:52:26 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
4月 20 20:52:26 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
4月 20 20:52:26 localhost.localdomain systemd[1]: docker.service failed.
4月 20 20:52:29 localhost.localdomain systemd[1]: docker.service holdoff time over, scheduling restart.
4月 20 20:52:29 localhost.localdomain systemd[1]: Stopped Docker Application Container Engine.
4月 20 20:52:29 localhost.localdomain systemd[1]: start request repeated too quickly for docker.service
4月 20 20:52:29 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
4月 20 20:52:29 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
4月 20 20:52:29 localhost.localdomain systemd[1]: docker.service failed.
回想之前配置了阿里云的镜像加速器,然后把镜像修改回去,依然不行。百思不得其解,后来,仔细观察文件,发现手残在json文件的每项最后面习惯性加了一个逗号(写前端养成的习惯),把逗号去掉后,启动成功。
后发现另外一个方法,好像也解决了很多人的问题,顺便收录:
如果是配置了国内镜像,并且镜像文件为/etc/docker/daemon.json,则修改文件后缀为.conf即可正常启动docker 服务