centos7 docker 镜像被墙后的最新解决方案

可使用本站镜像后的安装脚本安装,需要正确配置centos 的镜像源

1.安装docker


yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
yum install -y yum-utils
yum-config-manager --add-repo https://blog.szhcloud.cn/docker/docker-ce.repo
sed -i 's+https://download.docker.com+https://mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

2.设置docker 镜像加速


sudo tee /etc/docker/daemon.json <<-'EOF'
{
    "registry-mirrors": [
        "https://hub.uuuadc.top",
        "https://docker.anyhub.us.kg",
        "https://dockerhub.jobcher.com",
        "https://dockerhub.icu",
        "https://docker.ckyl.me",
        "https://docker.awsl9527.cn"
    ]
}

EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

3.安装 centos7 的 nvidia-container-toolkit


https://blog.szhcloud.cn/docker/nvidia-container-toolkit/libnvidia-container1-1.13.5-1.x86_64.rpm
https://blog.szhcloud.cn/docker/nvidia-container-toolkit/libnvidia-container-tools-1.13.5-1.x86_64.rpm
https://blog.szhcloud.cn/docker/nvidia-container-toolkit/nvidia-container-toolkit-1.13.5-1.x86_64.rpm
https://blog.szhcloud.cn/docker/nvidia-container-toolkit/nvidia-container-toolkit-base-1.13.5-1.x86_64.rpm
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注