修改完docker-仓库资源地址Error response from daemon: Get https://index.docker.io/v1/pull

[root@zengmg /]# docker pull centos
Error response from daemon: Get https://index.docker.io/v1/pull?q=centos: read tcp 52.200.132.201:443: i/o timeout
环境:Windows10

应用:Docker Desktop (下载地址:https://download.docker.com/win/stable/Docker%20Desktop%20Installer.exe

国内镜像配置:

1.Docker官方国内:https://registry.docker-cn.com
2.七牛云加速器:https://reg-mirror.qiniu.com/
3.网易镜像:http://hub-mirror.c.163.com
4.中科大镜像加速:https://docker.mirrors.ustc.edu.cn
5.阿里云镜像,自行到官网申请(教程:https://help.aliyun.com/document_detail/60750.html

开始也配置了国内镜像,docker search java 是可以搜索到结果的,docker pull java的时候报错

原因可能是镜像失败走了默认镜像,配置DNS为:8.8.8.8,多填写几个备用国内镜像加速即可。

参考官方文档:

NETWORK

You can configure Docker Desktop networking to work on a virtual private network (VPN). Specify a network address translation (NAT) prefix and subnet mask to enable Internet connectivity.

DNS Server: You can configure the DNS server to use dynamic or static IP addressing.

Note: Some users reported problems connecting to Docker Hub on Docker Desktop Stable version. This would manifest as an error when trying to run docker commands that pull images from Docker Hub that are not already downloaded, such as a first time run of docker run hello-world. If you encounter this, reset the DNS server to use the Google DNS fixed address: 8.8.8.8. For more information, see Networking issues in Troubleshooting.

Updating these settings requires a reconfiguration and reboot of the Linux VM.

---大致意思就是,Docker Desktop运行docker pull镜像命令出错不能下载,例如首次运行docker run hello-world,如果遇到此问题,重设置DSN为google的DNS:8.8.8.8   详细参考https://docs.docker.com/docker-for-windows/troubleshoot/#networking-issues

国内镜像配置如下,

{
  "registry-mirrors": [
    "https://yourid_xxx.mirror.aliyuncs.com",
    "https://reg-mirror.qiniu.com/",
    "http://hub-mirror.c.163.com"
  ],
  "insecure-registries": [],
  "debug": true,
  "experimental": false
}
配置DNS
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值