第一步
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 makecache fast
第五步
yum install docker-ce
第六步
启动
service docker start
docker version
docker pull hello-world
docker run hello-world
阿里云镜像容器加速地址
https://dd6viyc9.mirror.aliyuncs.com
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://dd6viyc9.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker