环境信息: [root@joinApp2 ~]# uname -r 3.10.0-123.9.3.el7.x86_64 [root@joinApp2 ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 症状: [root@joinApp2 ~]# 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@joinApp2 ~]# [root@joinApp2 ~]# [root@joinApp2 ~]# [root@joinApp2 ~]# systemctl status docker.service ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Thu 2016-02-25 17:26:11 CST; 16s ago Docs: http://docs.docker.com Process: 16384 ExecStart=/usr/bin/docker daemon $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=1/FAILURE) Main PID: 16384 (code=exited, status=1/FAILURE) Feb 25 17:26:10 joinApp2 systemd[1]: Failed to start Docker Application Container Engine. Feb 25 17:26:10 joinApp2 systemd[1]: Unit docker.service entered failed state. Feb 25 17:26:10 joinApp2 systemd[1]: docker.service failed. Feb 25 17:26:11 joinApp2 systemd[1]: docker.service holdoff time over, scheduling restart. Feb 25 17:26:11 joinApp2 systemd[1]: start request repeated too quickly for docker.service Feb 25 17:26:11 joinApp2 systemd[1]: Failed to start Docker Application Container Engine. Feb 25 17:26:11 joinApp2 systemd[1]: Unit docker.service entered failed state. Feb 25 17:26:11 joinApp2 systemd[1]: docker.service failed.
https://www.cnblogs.com/yizhipanghu/p/9970510.html
现象:Centos7.3通过yum安装完docker后,启动docker失败
机器的系统版本:CentOS Linux release 7.3.1611 (Core)
centos7,执行完安装命令: yum -y install docker
执行启动命令: systemctl start docker ,报如下错误:
[root@localhost lib]# systemctl start dockerJob for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@localhost lib]# systemctl status docker● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 六 2018-11-17 01:10:23 CST; 1min 20s ago
Docs: http://docs.docker.com
Process: 11743 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 --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
Main PID: 11743 (code=exited, status=1/FAILURE)
11月 17 01:10:21 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
11月 17 01:10:21 localhost.localdomain dockerd-current[11743]: time="2018-11-17T01:10:21.635497926+08:00" level=warning msg=...und"
11月 17 01:10:21 localhost.localdomain dockerd-current[11743]: time="2018-11-17T01:10:21.637443612+08:00" level=info msg="li...750"
11月 17 01:10:23 localhost.localdomain dockerd-current[11743]: Error starting daemon: SELinux is not supported with the over...lse)11月 17 01:10:23 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
11月 17 01:10:23 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
11月 17 01:10:23 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
11月 17 01:10:23 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
报错信息: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or disable selinux in docker (--selinux-enabled=false)
原因分析: 此linux的内核中的SELinux不支持 overlay2 graph driver ,解决方法有两个,要么启动一个新内核,要么就在docker里禁用selinux,--selinux-enabled=false
重新编辑docker配置文件:
重新启动docker服务:systemctl start docker
vi /etc/sysconfig/selinux 把selinux后面的改为disabled,重启一波机器,再重启docker就可以了
这个可以通过如下方式解决:
查看文件系统 /etc/docker/daemon.json 有没有这个文件,没有测创建它包括二级目录 docker
在daemon.json文件中输入以下内容:
如果daemon.json 文件包含格式不正确的JSON, Docker将无法启动 。
楼主,这个问题最终如何解决的呢?求解答