
正文
docker 启动失败
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
今天本来想抽空弄一下openshift,新装了个centos结果docker起不来。
报错内容:
[root@master docker]# systemctl status docker.service -l
[0m 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 -- :: PDT; 11s ago
Docs: http://docs.docker.com
Process: 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=/FAILURE)
Main PID: (code=exited, status=/FAILURE) May :: master.example.com systemd[]: Starting Docker Application Container Engine...
May :: master.example.com dockerd-current[]: time="2018-05-21T23:36:10.793396862-07:00" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
May :: master.example.com dockerd-current[]: time="2018-05-21T23:36:10.795010416-07:00" level=info msg="libcontainerd: new containerd process, pid: 10729"
May :: master.example.com dockerd-current[]: time="2018-05-21T23:36:11.800508541-07:00" level=warning msg="overlay2: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior. Reformat the filesystem with ftype=1 to enable d_type support. Running without d_type support will no longer be supported in Docker 1.16."
May :: master.example.com dockerd-current[]: 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)
May :: master.example.com systemd[]: docker.service: main process exited, code=exited, status=/FAILURE
May :: master.example.com systemd[]: Failed to start Docker Application Container Engine.
May :: master.example.com systemd[]: Unit docker.service entered failed state.
May :: master.example.com systemd[]: docker.service failed.
其中有一句: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)
可以看出来,这个版本的centos不支持selinux 打开docker的配置文件,/etc/sysconfig/docker 在“OPTIONS='--selinux-enabled”后加“=false”,其余不变,保存退出。
再启动,OK







