1.安装
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2.设置阿里云
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3.更新yum缓存
sudo yum makecache fast
4.安装docker-ce并启动
sudo yum install docker-ce
sudo systemctl enable docker
sudo systemctl start docker