如何在 Ubuntu 20.04 中解决此问题?
[18:31:29] (dpcc) jalal@echo:~/research/code$ sudo docker pull docurdt/heal
[sudo] password for jalal:
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
$ uname -a
Linux echo 5.4.0-99-generic #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ docker --version
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2
我对 CentOS 7 上的这个 $ docker pull 没有问题。
这是我使用的代理~/.bashrc
:
export http_proxy="http://webproxy.bu.edu:8900"
export https_proxy="http://webproxy.bu.edu:8900"
export ftp_proxy="http://webproxy.bu.edu:8900"
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,.bu.edu,.ad.bu.edu,128.197.,10."
添加了这些,config.json
但注销后错误仍然存在:
$ cat ~/.docker/config.json
{
"proxies":
{
"default":
{
"httpProxy": "http://webproxy.bu.edu:8900",
"httpsProxy": "http://webproxy.bu.edu:8900",
"noProxy": "localhost,127.0.0.1,.bu.edu,.ad.bu.edu,128.197.,10."
}
}
}
我得到:
[19:38:02] jalal@echo:~/research/code$ docker pull docurdt/heal
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
这就是我在 http-proxy.conf 中的内容:
非常感谢 IRC 的 twainwek 抽出宝贵时间并与我分享此链接https://github.com/docker/for-win/issues/1534#issuecomment-405903684