一. 检查Linux内核版本,CenterOS7安装docker要求内核版本在3.10以上:uname -rlinux
二. 使用yum命令安装:yum install dockerdocker
三. 启动Docker:service docker startvim
报错:Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.ide
按照提示:systemctl status docker.service,看到的日志信息:.net
看了几篇博客都没有解决,最终找到解决办法(原文见参考博客):是因为docker不支持图像内核驱动,SELinux不支持这个内核上的OrthALA2图形驱动程序。解决办法:修改docker配置文件:vim /etc/sysconfig/docker日志
把OPTIONS一行改成:OPTIONS='--selinux-enabled=false --log-driver=journald --signature-verification=false'code
按下“Esc”,输入“:”加“wq”保存退出vim编辑模式,再启动:service docker start就ok了。blog
四. 使用docker运行helloworld:docker run hello-worldget
做者:yzh_1346983557
来源:CSDN
原文:http://www.javashuo.com/article/p-kwsgttys-s.html
版权声明:本文为博主原创文章,转载请附上博文连接!博客