centOS8安装docker环境
#!/bin/bash
sudo yum remove docker docker-common docker-selinux docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
sudo sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
sudo yum makecache
sudo yum install -y container-selinux
wget "https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpm"
sudo rpm -ivh containerd.io-1.2.13-3.2.el7.x86_64.rpm
sudo yum install -y docker-ce
sudo systemctl enable --now docker.service
sudo docker version