Rocky Linux 安装docker+配置dnf源
安装docker
#step 1: 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
#Step 2: 添加软件源信息
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#Step 3: 更新并安装Docker-CE
sudo yum makecache fast
sudo yum -y install docker-ce
#Step 4: 开启Docker服务
sudo systemctl start docker
#Step 5: 安装校验
输入: docker version
配置dnf源
# 来源于 https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11sgNof3
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all && yum makecache
yum install -y https://mirrors.aliyun.com/epel/epel-next-release-latest-8.noarch.rpm
yum makecache