0.更新yum

yum -y update

1.手动安装container.io

yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/containerd.io-1.3.7-3.1.el8.x86_64.rpm

2.安装一些依赖

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

3. 安装docker

yum install -y docker-ce 

4.启动docker

systemctl start docker

5. 查看版本

docker version

6. 测试

docker run hello-world