erwewwewe 发表于 2017-3-16 15:06:24

docker问题解决集合

1、启动时候显示启动错误,查看信息,发现是配置信息错误

# service docker start
Redirecting to /bin/systemctl startdocker.service
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 (/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: Starting Docker Application Container Engine...
Mar 15 08:55:44 localhost.localdomain dockerd-current: 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: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 15 08:55:44 localhost.localdomain systemd: Failed to start Docker Application Container Engine.
Mar 15 08:55:44 localhost.localdomain systemd: Unit docker.service entered failed state.
Mar 15 08:55:44 localhost.localdomain systemd: 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'

sdylag 发表于 2017-3-17 09:16:19

{:6_394:}{:6_394:}{:6_394:} 感谢分享。

西园 发表于 2017-3-17 09:52:05

我还没有碰到这个问题

especially 发表于 2017-3-17 19:21:21

谢谢 分享
页: [1]
查看完整版本: docker问题解决集合