欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决docker启动报错“Error starting daemon: SELinux is not supported with the overlay2 graph driver on this

程序员文章站 2022-06-03 11:45:11
...

解决docker启动报错“Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. ”

前提:
环境:centos7
已经通过yum安装好了docker

命令:systemctl start docker时启动失败,
systemctl status docker.service查看报错信息,发现:
报错:Error starting daemon: 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)
解决docker启动报错“Error starting daemon: SELinux is not supported with the overlay2 graph driver on this

解决方案:

意思是说:此linux的内核中的SELinux不支持 overlay2 graph driver ,解决方法有两个,要么启动一个新内核,要么就在docker里禁用selinux,

--selinux-enabled=false

重新编辑/etc/sysconfig/docker配置文件:
解决docker启动报错“Error starting daemon: SELinux is not supported with the overlay2 graph driver on this
vim /etc/sysconfig/docker修改后的内容如下:

OPTIONS='--selinux-enabled=false --log-driver=journald --signature-verification=false'
if [ -z "${DOCKER_CERT_PATH}" ]; then
    DOCKER_CERT_PATH=/etc/docker
fi

然后systemctl start docker成功,如下图:
解决docker启动报错“Error starting daemon: SELinux is not supported with the overlay2 graph driver on this

好了,聪明如你,知道了解决docker启动报错的方法,是不是很欢喜 ^_^

还有其他问题的可以在评论区留言或者扫码加博主获取资源或者提问。
解决docker启动报错“Error starting daemon: SELinux is not supported with the overlay2 graph driver on this