docker pull centos:8
docker run -d --name base_centos --privileged -p 10023:22 centos:8 /usr/sbin/init
此处需要暴露容器的22端口
docker exec -it base_centos bash
更新yum源
yum update -y
修改为阿里源
mkdir /etc/yum.repos.d/back
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/back
curl -o /etc/yum.repos.d/CentOS-Base.repo <https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo>
yum clean all
yum makecache