Centos7 安装Docker
1.下载docker基本依赖环境
yum install -y yum-utils device-mapper-persistent-data lvm2 libsemanage-python libselinux-utils
2.添加下载源,并刷新缓存
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
cd /etc/yum.repos.d/
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
3.查询docker版本
yum list docker-ce --showduplicates|sort -r
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/0fa639640100ce1b8db76429a1538269.png)
4.下载指定版本
yum install docker-ce-18.06.3.ce-3.el7 -y
5.启动docker
systemctl start docker && systemctl enable docker