由于docker官方更新了相关镜像路由,导致国内用户无法正常手段安装使用docker,本人推荐使用下面操作进行安装。
1.docker-ce安装
# 添加docker-ce仓库,本次使用的是阿里云的仓库
dnf config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 建议将仓库内容的源替换为清华的源,因为清华的源很快
sed -i 's+https://mirrors.aliyun.com+https://mirrors.tuna.tsinghua.edu.cn+' /etc/yum.repos.d/docker-ce.repo
# 安装docker-ce环境
dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin2.添加镜像源
编辑文件 vim /etc/docker/daemon.json 添加下面内容
# [root@localhost ~]# cat /etc/docker/daemon.json
{
 "registry-mirrors": [
    "https://dockerhub.icu",
    "https://docker.m.daocloud.io",
    "https://docker.chenby.cn",
    "https://docker.1panel.live",
    "https://docker.awsl9527.cn",
    "https://docker.anyhub.us.kg",
    "https://dhub.kubesre.xyz"
 ]
}
3.重启容器服务
systemctl daemon-reload
systemctl restart docker4.下载镜像
docker pull python:3.12.5-slim 



















