Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.


當我們向私有倉庫推送鏡像,如下:

$ docker push *.*.*.*:5000/pod-infrastructure:latest
The push refers to a repository [*.*.*.*:5000/pod-infrastructure]
Get https://*.*.*.*:5000/v1/_ping: http: server gave HTTP response to HTTPS client

原因是:Docker自從1.3.X之后docker registry交互默認使用的是HTTPS,但是搭建私有鏡像默認使用的是HTTP服務導致。

處理辦法如下:

# 修改啟動文件第12行 
$ vim /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --insecure-registry *.*.*.*:5000

或者

$ vim /etc/docker/daemon.json
{
"insecure-registries":["*.*.*.*:5000"]
}

重啟docker服務

$ systemctl daemon-reload
$ systemctl restart docker

如出現如下報錯:

$ systemctl restart docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

 這個可能是/etc/docker/daemon.json內容配置有誤,需要認真檢查;

或者/etc/sysconfig/docker里面已經配置了insecure-registries內容,重復配置導致的問題,刪掉重復的insecure-registries內容即可。

結束!


免責聲明!

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



猜您在找 docker 報錯: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. docker 啟動失敗 Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. DOCKER啟動失敗Job for docker.service failed because the control process exited with error code. See "syste mctl status docker.service" and "journalctl -xe" for details. Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details Linux系統Docker啟動問題Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. centos7啟動MySQL報 Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. Job for php-fpm.service failed because the control process exited with error code. See "systemctl status php-fpm.service" and "journalctl -xe" for details. Jenkins報錯:Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM