Docker启动报错 Error starting daemon: SELinux is not supported

环境:centos7

  1. 安装docker

    yum install docker -y

  2. 启动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.

  3. 查看报错原因

    systemctl status docker.service
    错误原因

  4. 查找解决方案:

    意思是说:
    此linux的内核中的SELinux不支持 overlay2 graph driver ,解决方法有两个,要么启动一个新内核,要么就在docker里禁用selinux,–selinux-enabled=false,显然后面一种人性化
    重新编辑docker配置文件:
    vi /etc/sysconfig/docker
    这里写图片描述

  5. 重新启动ok

猜你喜欢

转载自blog.csdn.net/yucdsn/article/details/81068018