一,安装软件包
yum install -y yum-utils device-mapper-persistent-data lvm2
二,更换yum源为阿里源:
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
三,查看docker版本,并选择安装
yum list docker-ce --showduplicates | sort -r

四,选择一个版本进行安装
yum -y install docker-ce-24.0.8

出现下方的complete,表示安装完成。

五,启动 Docker 并设置开机自启
systemctl start docker ; systemctl enable docker

六,查看docker版本
docker version
