yum安装docker报错:Job for docker.service failed because the control process exited with error code

yum安装docker报错:Job for docker.service failed because the control process exited with error code

一. 检查Linux内核版本,CenterOS7安装docker要求内核版本在3.10以上:uname -r

二. 使用yum命令安装:yum install docker

三. 启动Docker:systemctl start docker 有时候会看到如下的报错:

[root@MiWiFi-R3-srv ~]# systemctl start docker
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 查看详细的错误信息

[root@MiWiFi-R3-srv default]# 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 Mon 2018-12-31 17:11:14 EST; 3min 26s ago
     Docs: http://docs.docker.com
  Process: 14196 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: 14196 (code=exited, status=1/FAILURE)

Dec 31 17:11:13 MiWiFi-R3-srv systemd[1]: Starting Docker Application Container Engine...
Dec 31 17:11:13 MiWiFi-R3-srv dockerd-current[14196]: time="2018-12-31T17:11:13.537596122-05:00" level=warning msg="could not change group /var/run/docker....ot found"
Dec 31 17:11:13 MiWiFi-R3-srv dockerd-current[14196]: time="2018-12-31T17:11:13.552867187-05:00" level=info msg="libcontainerd: new containerd process, pid: 14201"
Dec 31 17:11:14 MiWiFi-R3-srv dockerd-current[14196]: time="2018-12-31T17:11:14.566031767-05:00" level=warning msg="overlay2: the backing xfs filesystem is formatte...
Dec 31 17:11:14 MiWiFi-R3-srv dockerd-current[14196]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either...ed=false)
Dec 31 17:11:14 MiWiFi-R3-srv systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 31 17:11:14 MiWiFi-R3-srv systemd[1]: Failed to start Docker Application Container Engine.
Dec 31 17:11:14 MiWiFi-R3-srv systemd[1]: Unit docker.service entered failed state.
Dec 31 17:11:14 MiWiFi-R3-srv systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

具体原因是:是由于docker不支持图像内核驱动,SELinux不支持这个内核上的OrthALA2图形驱动程序

解决方式:修改docker配置文件:vim /etc/sysconfig/docker

把OPTIONS一行改为:OPTIONS=’–selinux-enabled=false --log-driver=journald --signature-verification=false’

再启动:systemctl start docker 就可以了

你可能感兴趣的:(linux)