1.更换阿里云源(不换下载很慢)
sed -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' -i.bak /etc/yum.repos.d/rocky-*.repo
dnf makecache
2.更新系统包
sudo dnf update -y
sudo dnf install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io
3.**启动 Docker 服务
sudo systemctl start docker # 启动
sudo systemctl restart docker #重启
sudo systemctl status docker #查看是否运行
4.安装 Docker Compose
curl -L "https://github.com/docker/compose/releases/download/2.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose**
sudo chmod +x /usr/local/bin/docker-compose
标签:dnf,sudo,ce,compose,Rocky9.2,https,docker
From: https://www.cnblogs.com/Rohing/p/18441819