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

#解决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_第1张图片

解决方案:

意思是说:此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_第2张图片
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启动报错的方法,是不是很欢喜 _

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

你可能感兴趣的:(Docker容器)