1. 程式人生 > >centOS7安裝完docker之後無法啟動問題

centOS7安裝完docker之後無法啟動問題

centOS直接用yum命令安裝完docker後,啟動報錯

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

用systemctl status docker.service命令 檢視日誌,有如下錯誤,其中有一條 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) 

   

根據錯誤日誌得知,此linux的核心中的SELinux不支援 overlay2 graph driver ,解決方法有兩個,要麼啟動一個新核心,要麼就在docker裡禁用selinux,--selinux-enabled=false 重新編輯docker配置檔案: # vim /etc/sysconfig/docker