欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 科技 > IT业 > docker官方源无法使用的解决办法

docker官方源无法使用的解决办法

2024/10/24 22:05:30 来源:https://blog.csdn.net/youziguo/article/details/139737449  浏览:    关键词:docker官方源无法使用的解决办法

使用官方源

  yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

安装docker报错

Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a03:2880:f10d:83:face:b00c:0:25de: Network is unreachable"
Trying other mirror.
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a03:2880:f10d:83:face:b00c:0:25de: Network is unreachable"
Trying other mirror.
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2a03:2880:f10d:83:face:b00c:0:25de: Network is unreachable"
Trying other mirror.
^Chttps://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"
Trying other mirror.

.....................

failure: repodata/repomd.xml from docker-ce-stable: [Errno 256] No more mirrors to try.
 curl#7 - "Failed to connect to 2a03:2880:f10d:83:face:b00c:0:25de: Network is unreachable"
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#56 - "Callback aborted"

这个问题可能是由于Docker官方源的问题,可以尝试更换其他的Docker源。以下是一些常用的Docker源:

  1. 阿里云:docker-ce-linux-centos-7.9-x86_64-stable
  2. 网易:http://hub-mirror.c.163.com/docker-ce/linux/centos/7.9/x86_64/stable/
  3. 中国科技大学:https://mirrors.ustc.edu.cn/docker-ce/linux/centos/7.9/x86_64/stable/

选择一个合适的源,修改yum源配置文件

  1. 打开或创建yum源配置文件,路径为/etc/yum.repos.d/docker-ce.repo
  2. 将以下内容复制到文件中(以阿里云为例):

[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7.9/x86_64/stable
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg

保存文件并退出,清除缓存并重新尝试安装Docker:

sudo yum clean all
sudo yum install docker-ce

相关推荐:

构建JDK1.8 centos7.9镜像_jdk18centos国内镜像-CSDN博客 

docker和虚拟机的异同-CSDN博客

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com