2017-08-10 81 views
0

我也定在CLI代理如下:碼頭工人通過代理

$ export http_proxy="http://10.20.6.67:1209" 
$ export https_proxy="https://10.20.6.67:1209" 
$ export no_proxy="localhost,127.0.0.1,0.0.0.0" 

試圖拉從碼頭工人的形象回到我下面的錯誤:

$ docker pull couchdb 
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) 

回答

0

有人回答,並刪除了答案。

我解決了作爲https://docs.docker.com/engine/admin/systemd/#httphttps-proxy

描述創建一個名爲/etc/systemd/system/docker.service.d/http-proxy.conf,增加了HTTP_PROXY環境變量:

[Service] 
Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com" 

沖洗變化:

$ sudo systemctl daemon-reload 

重啓泊塢窗:

$ sudo systemctl restart docker 

現在碼頭拉工程!