1. 程式人生 > >Docker啟動報錯 Error starting daemon: SELinux is not supported

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