docker 啟動失敗


問題

docker 啟動服務失敗

場景

在Ubuntu中,將docker切換阿里鏡像后,運行如下兩條命令: 

sudo systemctl daemon-reload

sudo systemctl restart docker

在重啟docker服務這,報錯信息如下: 

Job for docker.service failed because the control process exited with error code.

See "systemctl status docker.service" and "journalctl -xe" for details.

通過運行 systemctl status docker.service 命令,輸出信息如下: 

● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-07-11 23:49:55 CST; 56s ago
Docs: https://docs.docker.com
Process: 4316 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=
Main PID: 4316 (code=exited, status=1/FAILURE)

7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Service hold-off time over, schedulin
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Scheduled restart job, restart counte
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: Stopped Docker Application Container Engine.
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Start request repeated too quickly.
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: docker.service: Failed with result 'exit-code'.
7月 11 23:49:55 hujing-ThinkPad-E550c systemd[1]: Failed to start Docker Application Container Engine.

 

解決

原因是在json配置文件中的配置信息多加了一個逗號

{
"registry-mirrors": [
"https://abc.mirror.aliyuncs.com", 
]
}

將網址后邊的逗號刪除,就可以啟動了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM