CentOS7安装docker、启动docker失败的解决

一. 检查Linux内核版本,CenterOS7安装docker要求内核版本在3.10以上:uname  -r

二. 使用yum命令安装:yum install docker

三. 启动Docker:service docker start

报错: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,看到的日志信息:

看了几篇博客都没有解决,最终找到解决办法(原文见参考博客):是由于docker不支持图像内核驱动,SELinux不支持这个内核上的OrthALA2图形驱动程序。解决办法:修改docker配置文件:vim  /etc/sysconfig/docker

把OPTIONS一行改为:OPTIONS='--selinux-enabled=false --log-driver=journald --signature-verification=false'

按下“Esc”,输入“:”加“wq”保存退出vim编辑模式,再启动:service docker start就ok了。

四. 使用docker运行helloworld:docker run hello-world

参考博客:https://www.cnblogs.com/ya-qiang/p/9093145.html

猜你喜欢

转载自blog.csdn.net/yzh_1346983557/article/details/81780163