问题:目前安装完docker后,直接从国内大陆下载镜像文件有时候会无法下载的会报错。
error pulling image configuration: download failed after attempts=6: read tcp 10.50.xxx.xxx:60612->104.16.100.215:443: read: connection reset by peer
这里配置镜像下载代理,配置镜像代理文件。
cat daemon.json
{
"registry-mirrors": [
"https://hub.iyuu.cn",
"https://docker.1panel.live"
]
}
重启服务
再次下载镜像文件会发现很速度很快,也不会报错网络连接失败了。
docker]# docker pull jenkins/jenkins:2.319.1-lts
2.319.1-lts: Pulling from jenkins/jenkins
647acf3d48c2: Pull complete
832e288237bc: Pull complete
ea194d1bd1da: Pull complete
98569593b9fd: Pull complete
dfe249e8cdf2: Pull complete
0f6f2e6d37bb: Pull complete
07fcb98649b6: Pull complete
1e33c26b1882: Pull complete
7b24f0e29fe1: Pull complete
4d90ef3a8f3b: Pull complete
d98c8e675bea: Pull complete
b45fc2bf9fd7: Pull complete
d6e1fda9effc: Pull complete
3635a44047f2: Pull complete
486e1776d3bc: Pull complete
41233d151800: Pull complete
14a67803c2b3: Pull complete
Digest: sha256:c1d02293a08ba69483992f541935f7639fb10c6c322785bdabaf7fa94cd5e732
Status: Downloaded newer image for jenkins/jenkins:2.319.1-lts
docker.io/jenkins/jenkins:2.319.1-lts