[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 ofdocker 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
}
![](https://i-blog.csdnimg.cn/blog_migrate/c0d8137b7a6a268d23edb3013a7f8a41.png)