docker在虚拟机中下载安装成功 启动报错,报错如下:
[root@localhost ~]# 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.
日志 详细错误如下:
[root@localhost ~]# 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-11-12 08:50:41 EST; 11s ago
Docs: http://docs.docker.com
Process: 2174 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: 2174 (code=exited, status=1/FAILURE)
Nov 12 08:50:37 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Nov 12 08:50:40 localhost.localdomain dockerd-current[2174]: time="2018-11-12T08:50:40.122445614-05:00" level=warning msg="could not change group /var/run/dock...t found"
Nov 12 08:50:40 localhost.localdomain dockerd-current[2174]: time="2018-11-12T08:50:40.129401188-05:00" level=info msg="libcontainerd: new containerd process, pid: 2178"
Nov 12 08:50:41 localhost.localdomain dockerd-current[2174]: time="2018-11-12T08:50:41.219549844-05:00" level=warning msg="overlay2: the backing xfs filesystem is form...
Nov 12 08:50:41 localhost.localdomain dockerd-current[2174]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Eit...d=false)
Nov 12 08:50:41 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Nov 12 08:50:41 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Nov 12 08:50:41 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Nov 12 08:50:41 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
此处意思是linux的内核中的SELinux不支持 overlay2 graph driver ,解决方法有两个,要么启动一个新内核,要么就在docker里禁用selinux,–selinux-enabled=false,
然后重新启动docker即可