前情介绍:在以前的docker版本中只需配阿里云的镜像下载就很快了,但是下载了新版本docker in Windows后,置Windows系统下的docker配置了阿里云镜像后下载依然很慢时,之后多配几个镜像可以改善问题。
问题现象:
1、下载慢,很可能一天一个镜像都下载不下来
2、出现超时现象,如下
faef57eae888: Downloading [====> ] 2.485MB/26.55MB
bb595d48e52d: Download complete
d479b54c3bb2: Download complete
2044989c541a: Retrying in 1 second
01e4ba5495fa: Download complete
ed7a9fd4b0ea: Download complete
Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/20/2044989c541ac86643e33c6c4be3d48b9a0125c687ced37377ec32b9cc5e4a33/data?verify=1690262098-1n1XyC%2BNA5a7yPWQZvFHJzq4Y1U%3D": net/http: TLS handshake timeout
解决办法:
配置多个镜像源路径
镜像源路径如下,配置后下载很快。
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://mirror.ccs.tencentyun.com",
"https://vamokfvd.mirror.aliyuncs.com"
]