美文网首页
docker启动失败

docker启动失败

作者: JiangCheng97 | 来源:发表于2019-08-06 23:57 被阅读0次

    环境:centos7

    命令:systemctl start docker

    报错信息:

    [root@localhost ~]# systemctl status docker.service -l
    ● docker.service - Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Tue 2019-08-06 11:37:38 EDT; 4min 32s ago
         Docs: http://docs.docker.com
      Process: 5027 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: 5027 (code=exited, status=1/FAILURE)
    
    Aug 06 11:37:35 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
    Aug 06 11:37:35 localhost.localdomain dockerd-current[5027]: time="2019-08-06T11:37:35.694105147-04:00" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
    Aug 06 11:37:35 localhost.localdomain dockerd-current[5027]: time="2019-08-06T11:37:35.706150308-04:00" level=info msg="libcontainerd: new containerd process, pid: 5034"
    Aug 06 11:37:36 localhost.localdomain dockerd-current[5027]: time="2019-08-06T11:37:36.721859443-04: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."
    
    Aug 06 11:37:38 localhost.localdomain dockerd-current[5027]: 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)
    
    Aug 06 11:37:38 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
    Aug 06 11:37:38 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
    Aug 06 11:37:38 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
    Aug 06 11:37:38 localhost.localdomain systemd[1]: 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)
    

    解决方案:

    vi /etc/sysconfig/docker
    

    修改信息:

    # Modify these options if you want to change the way the docker daemon runs
    OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'
    if [ -z "${DOCKER_CERT_PATH}" ]; then
        DOCKER_CERT_PATH=/etc/docker
    

    修改selinux-enabled=false,重新启动成功

    相关文章

      网友评论

          本文标题:docker启动失败

          本文链接:https://www.haomeiwen.com/subject/eqtndctx.html