win10下起了一个centos7的虚拟机,配置好网卡就行了
1:安装
centos7的yum源中有docker,直接安装就可以
$ yum install docker -y
安装完成

完成示意
2:准备启动
$ service docker start
报如下错误(如果启动成功请看第3步
)

启动错误示意
查看错误

真实问题
经过查阅资料,作如下处理:
(1)修改/etc/sysconfig/docker文件
vi /etc/sysconfig/docker

docker修改示意
将图中 --selinux-enabled直接删掉
(2)修改/etc/sysconfig/docker-storage
vi /etc/sysconfig/docker-storage

docker-storage修改示意
3:启动成功

启动成功
4:试运行
$ docker version

docker version
安装第一个docker镜像
$ docker pull hello-world

docker pull hello-world
运行hello-world
$ docker run hello-world

docker run hello-world
查看docker所有镜像
$ docker images

docker images
完成以上内容,则证明docker安装成功了,恭喜你
文章转载于:https://www.jianshu.com/p/ec02810d6a2b
原著是一个有趣的人,若有侵权,请通知删除
还没有人抢沙发呢~