9

When I installed docker and ran service docker start I got this message:

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

When I ran journalctl -xe I got this message:

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

thanks my friends

2
  • 2
    i find config file in /etc/sysconfig/docker . and i add` DOCKER_OPTS="--storage-driver=devicemapper" ` and delete OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false' it's ok why?
    – xzg
    Aug 2, 2017 at 12:55
  • 1
    Because different OS have different storage drivers available. Read this docs.docker.com/engine/userguide/storagedriver/selectadriver Aug 2, 2017 at 17:54

2 Answers 2

26

Docker version 1.13.1

For CentOS Linux release 7.2.1511 (Core), ensure following DOCKER_STORAGE_OPTIONS option is set to devicemapper.

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

bash # vi /etc/sysconfig/docker-storage-setup
...
STORAGE_DRIVER=devicemapper
...
2
  • Thanks @Praveen! Changing the files worked! Just to add a bit. You need to do the obvious step sudo systemctl restart docker after it.
    – Coder
    Jun 27, 2018 at 23:56
  • While this is a quick god-sent fix, the reason is in the next answer, which is docker 1.13 being only compatible with the storage "devicemapper" not "overlay2" on CentOS. Thanks a lot for the answer. Jul 2, 2018 at 6:57
3

According to the compatibility matrix docker-1.13 for CentOS supports only devicemapper.

Got a similar problem with docker trying to start by default with overlay2, solved downgrading to docker-1.12.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.