真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

dockerpull拉取超時的解決方案

最近docker pull鏡像的時候非常不穩(wěn)定,速度慢不說還經(jīng)常超時失敗

天柱ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應(yīng)用場景,ssl證書未來市場廣闊!成為成都創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18982081108(備注:SSL證書合作)期待與您的合作!

Pulling xlxdsj_swagger_ui (swaggerapi/swagger-ui:)...latest: Pulling from swaggerapi/swagger-uiba3557a56b15: Pull complete1a18b9f93d41: Pull complete38ceab6c6432: Pull complete6104f3bd82cc: Pull complete750e0e12d70c: Pull completed7c38a871210: Pull completecbd9bbb7c3b7: Pull complete3d6723371070: Pull complete5e5b2de4487f: Pull complete3c84c9c2d567: Pull complete9e7d57b00bb8: Pull complete5356d2f5be08: Pull completeDigest: sha256:2a746f15dacc2f2e381b3449544b82e6c7604567f05606d957ff5b7cf7d29a47Status: Downloaded newer image for swaggerapi/swagger-ui:latestPulling xlxdsj_swagger_editor (swaggerapi/swagger-editor:)...ERROR: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)大致的解決辦法有三個

1、修改DNS

2、修改鏡像倉庫地址

3、修改hosts

使用socks5代理

以下操作均在CentOS7,Ubuntu與之基本一致,macOS以及windos原理一致

修改DNS>>> vim /etc/resolv.confnameserver 8.8.8.8修改鏡像倉庫地址>>> vim /etc/docker/daemon.json{ "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn", "https://reg-mirror.qiniu.com"]}>>> systemctl daemon-reload>>> systemctl restart docker修改host# 安裝dig>>> sudo yum install bind-utils>>> dig @114.114.114.114 registry-1.docker.io; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.3 <<>> @114.114.114.114 registry-1.docker.io; (1 server found);; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18733;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 512;; QUESTION SECTION:;registry-1.docker.io. IN A;; ANSWER SECTION:registry-1.docker.io. 38 IN A 54.85.56.253registry-1.docker.io. 38 IN A 35.174.73.84registry-1.docker.io. 38 IN A 23.22.155.84registry-1.docker.io. 38 IN A 18.213.137.78registry-1.docker.io. 38 IN A 107.23.149.57registry-1.docker.io. 38 IN A 52.5.11.128registry-1.docker.io. 38 IN A 52.54.232.21registry-1.docker.io. 38 IN A 52.20.56.50;; Query time: 8 msec;; SERVER: 114.114.114.114#53(114.114.114.114);; WHEN: Tue Feb 23 09:03:18 CST 2021;; MSG SIZE rcvd: 177>>> sudo vim /etc/hosts35.174.73.84 registry-1.docker.io使用socks5代理

如果之前的方法效果都不太好再考慮使用這個

前提是已經(jīng)裝好ss

>>> vim /etc/systemd/system/docker.service.d/http-proxy.conf[Service]Environment="HTTP_PROXY=socks5://127.0.0.1:1080">>> systemctl daemon-reload>>> systemctl restart docker>>> systemctl show --property=Environment dockerEnvironment=HTTP_PROXY=socks5://127.0.0.1:1080

補充:解決docker pull鏡像報錯或者超時的方案,將拉取地址改為國內(nèi)鏡像倉庫

docker默認(rèn)鏡像拉取地址為國外倉庫下載速度較慢,甚至?xí)筮@種錯

Error response from daemon: Get https://docker.elastic.co/v2/: net/http: TLS handshake timeout

解決方法修改 /etc/docker/daemon.json 文件并添加上 registry-mirrors 鍵值。

然后重啟docker就可以了

{ "registry-mirrors": ["https://registry.docker-cn.com"]}

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。如有錯誤或未考慮完全的地方,望不吝賜教。


分享題目:dockerpull拉取超時的解決方案
文章網(wǎng)址:http://weahome.cn/article/dsijj.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部