安装步骤:
1检查,并移除
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
2安装必要的依赖库
sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
sudo yum-config-manager \
--add-repo \
https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3 安装Docker
yum -y install docker-ce
4 启动
sudo systemctl start docker
5 测试
docker run hello-world