Centos7快速安装docker

偶然间发现,docker的安装好容易啊

系统环境:centos7.3

yum源:

docker:https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

我安装的时候还会提示缺少下面这个依赖包

container-selinux:http://mirrors.aliyun.com/repo/Centos-7.repo

安装步骤如下:

1.  yum install -y yum-utils device-mapper-persistent-data lvm2    #安装依赖

2.  yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo     #添加docker源

3.  yum install docker-ce -y  #安装docker

4.   yum install container-selinux -y  #如果有报错缺少container-selinux则执行这条语句安装

5.  systemctl start docker  #启动docker

6.  docker run hello-world  #测试docker

如果执行完第六步出现以下提示,说明docker安装成功

猜你喜欢

转载自www.cnblogs.com/biaopei/p/10299661.html