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'