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

版权声明:感谢您阅读我的文章,转载注明出处哦~~ https://blog.csdn.net/haoding205/article/details/82492263

解决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启动失败

解决方案:

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

--selinux-enabled=false

重新编辑/etc/sysconfig/docker配置文件:
编辑docker配置文件
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成功

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

还有其他问题的可以在评论区留言或者扫码加博主获取资源或者提问。
这里写图片描述

猜你喜欢

转载自blog.csdn.net/haoding205/article/details/82492263