泉缘泉 发表于 2024-7-15 20:45:42

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: 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: 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: 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: 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: 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: 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: curl#56 - "Callback aborted"
Trying other mirror.
.....................
failure: repodata/repomd.xml from docker-ce-stable: 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: curl#56 - "Callback aborted"
这个问题可能是由于Docker官方源的问题,可以尝试更换其他的Docker源。以下是一些常用的Docker源:

[*]阿里云:https://mirrors.aliyun.com/docker-ce/linux/centos/7.9/x86_64/stable/
[*]网易:http://hub-mirror.c.163.com/docker-ce/linux/centos/7.9/x86_64/stable/
[*]中国科技大学:https://mirrors.ustc.edu.cn/docker-ce/linux/centos/7.9/x86_64/stable/
选择一个符合的源,修改yum源配置文件

[*]打开或创建yum源配置文件,路径为/etc/yum.repos.d/docker-ce.repo
[*]将以下内容复制到文件中(以阿里云为例):
   
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镜像-CSDN博客
docker和虚拟机的异同-CSDN博客

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: docker官方源无法利用的解决办法