配置阿里云Docker源
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
查看Docker版本:
yum list docker-ce --showduplicates
安装docker
yum install docker-ce-19.03.5 -y
#两个同时执行
systemctl enable docker & systemctl start docker
#第一个成功了才执行下一个
systemctl enable docker && systemctl start docker
如果已安装可以删除已安装docker
########## Uninstall installed docker
sudo yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-selinux
docker-engine-selinux
docker-engine