Docker启动报错:SELinux is not supported with the overlay2 graph driver on

时间:2024-03-23 12:27:55

Docker在Linux中启动时无法正常启动:(如下)

[[email protected] ~]#systemctl start docker

Docker启动报错:SELinux is not supported with the overlay2 graph driver on
通过下面的命令查询详情,可以看出是引擎启动的问题

[[email protected] ~]#systemctl status docker.service

Docker启动报错:SELinux is not supported with the overlay2 graph driver on
原因是:此Linux的内核中的SELinux不支持 overlay2 graph driver ,这里的解决方法是在docker里禁用selinux:

重新编辑docker配置文件:

[[email protected] ~]#vi /etc/sysconfig/docker

Docker启动报错:SELinux is not supported with the overlay2 graph driver on
(1)输入“i”进入编辑状态
(2)改为“–selinux-enabled=false”(如下图)
(3)按“ESC”退出编辑
(4)输入“:wq”结束写入并保存

<补充:如果输错了想直接退出重新编辑,则按下Esc键后,输入“:q!”(表示忽略修改强行退出),然后回车即可。“wq”表示Write和Quit,即保存退出;>
Docker启动报错:SELinux is not supported with the overlay2 graph driver on
再次重新启动,成功

 [[email protected] ~]#systemctl start docker