docker問題解決集合

1、啓動時候顯示啓動錯誤,查看信息,發現是配置信息錯誤


[root@localhost docker]# service docker start
Redirecting to /bin/systemctl start  docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@localhost docker]# systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-03-15 08:55:44 CST; 8s ago
     Docs: http://docs.docker.com
  Process: 5695 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE)
 Main PID: 5695 (code=exited, status=1/FAILURE)

Mar 15 08:55:44 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Mar 15 08:55:44 localhost.localdomain dockerd-current[5695]: time="2017-03-15T08:55:44+08:00" level=fatal msg="unable to configure the Docker daemo... EOF\n"
Mar 15 08:55:44 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 15 08:55:44 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Mar 15 08:55:44 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Mar 15 08:55:44 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.


常見於更改配置文件之後docker不能正常啓動

查看 /etc/docker ,存在daemon.json文件,修改之後,還是不能正常啓動

刪除該文件,docker就能正常啓動


2、當pull或者push時候,出現EOF錯誤


docker pull 10.74.120.151:5000/clusterhqci/fpm-centos-7
Using default tag: latest
Trying to pull repository 10.74.120.151:5000/clusterhqci/fpm-centos-7 ...
Get https://10.74.120.151:5000/v1/_ping: EOF


使用下面方法解決:

vim /etc/sysconfig/docker     #如果使用的是docker-latest,在對應位置修改該配置增加下面這行
OPTIONS='--insecure-registry 10.74.29.152:5000'


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章