zoukankan      html  css  js  c++  java
  • SELinux导致的docker启动失败

    安装docker

    yum install -y docker

    启动docker

    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@c7 ~]# systemctl status docker
    ● 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 2019-01-14 03:00:04 EST; 12min ago
         Docs: http://docs.docker.com
    Main PID: 32274 (code=exited, status=1/FAILURE)
    ​
    ​
    Jan 14 03:00:02 c7 systemd[1]: Starting Docker Application Container Engine...
    Jan 14 03:00:02 c7 dockerd-current[32274]: time="2019-01-14T03:00:02.657456891-05:00" level=warning msg="could not change gr... found"
    Jan 14 03:00:02 c7 dockerd-current[32274]: time="2019-01-14T03:00:02.673696729-05:00" level=info msg="libcontainerd: new con... 32279"
    Jan 14 03:00:03 c7 dockerd-current[32274]: time="2019-01-14T03:00:03.765033141-05:00" level=warning msg="overlay2: the backing xfs ...
    Jan 14 03:00:04 c7 dockerd-current[32274]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on...=false)
    Jan 14 03:00:04 c7 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
    Jan 14 03:00:04 c7 systemd[1]: Failed to start Docker Application Container Engine.
    Jan 14 03:00:04 c7 systemd[1]: Unit docker.service entered failed state.
    Jan 14 03:00:04 c7 systemd[1]: docker.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.

    错误信息

    Jan 14 03:00:04 c7 dockerd-current[32274]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on...=false)

    所以错误是SELinux导致的。

    解决方案

    修改配置文件,将selinux-enabled改为selinux-enabled=false

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

    再次启动docker即可。

  • 相关阅读:
    明明已经include_once() 但还是报错Class 'XXXXXControllerTOPData' not found
    dell U2515H 2k显示器黑屏问题,dp线问题。
    centos7.4 php5升级到php7
    thinkphp批量插入 更新sql
    查询速度慢了10倍,查询条件类型不对,字符串当做数字类型。
    margin-left:auto;margin-right:auto; 不起作用的原因
    jquery 查找元素,id,class
    php分割url,获取参数query
    阿里云服务器删除日志的方法,查看有哪些大文件
    sql优化 分字段统计查询
  • 原文地址:https://www.cnblogs.com/blazeZzz/p/10267573.html
Copyright © 2011-2022 走看看