Centos7 安装 docker
1.直接安装
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl enable docker
systemctl start docker
2.指定版本
yum install -y yum-utils device-mapper-persistent-data lvm2
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
vi /etc/yum.repos.d/docker-ce.repo
yum makecache
yum list docker-ce --showduplicates | sort -r
yum install docker-ce-18.09.9-2.1.rc1.el7
systemctl enable docker
systemctl start docker