覆盖图驱动程序不支持 SELinux



当我安装 docker 并运行service docker start时,我收到以下消息:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

当我跑journalctl -xe时,我收到以下消息:

8月 02 20:42:11 centos-master systemd[1]: Unit docker-storage-setup.service entered failed state.
8月 02 20:42:11 centos-master systemd[1]: docker-storage-setup.service failed.
8月 02 20:42:11 centos-master systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit docker.service has begun starting up.
8月 02 20:42:11 centos-master dockerd-current[32672]: time="2017-08-02T20:42:11.667102874+08:00" level=info msg="libcontainerd: new containerd process, pid: 32676"
8月 02 20:42:11 centos-master dockerd-current[32672]: time="2017-08-02T20:42:11.681065709+08:00" level=info msg="[graphdriver] using prior storage driver "overlay""
8月 02 20:42:12 centos-master dockerd-current[32672]: time="2017-08-02T20:42:12.045251482+08:00" level=fatal msg="Error starting daemon: SELinux is not supported with the overlay graph driver
8月 02 20:42:12 centos-master systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
8月 02 20:42:12 centos-master systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed

谢谢我的朋友

Docker 版本 1.13.1

对于 CentOS Linux 发行版 7.2.1511(核心版(,请确保以下DOCKER_STORAGE_OPTIONS选项设置为devicemapper

bash # vi /etc/sysconfig/docker-storage
...
DOCKER_STORAGE_OPTIONS="--storage-driver devicemapper "
...
bash # vi /etc/sysconfig/docker-storage-setup
...
STORAGE_DRIVER=devicemapper
...

根据兼容性矩阵 docker-1.13 for CentOS 仅支持devicemapper.

在 docker 尝试默认使用overlay2启动时遇到了类似的问题,解决了降级到 docker-1.12 的问题。

最新更新