1
我正在嘗試將圖像拉到默認的泊塢窗機器上。但是,我總是得到在等待連接時取消請求的Docker拉失敗
[email protected]:/etc$ docker run hellow-world
Unable to find image 'hellow-world:latest' locally
docker: 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).
See 'docker run --help'.
[email protected]:/etc$
即使我給--dns選項同樣的錯誤
[email protected]:/etc$ docker run hellow-world --dns=8.8.8.8
Unable to find image 'hellow-world:latest' locally
docker: 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).
See 'docker run --help'.
[email protected]:/etc$
嘗試添加DNS到默認機器
"EngineOptions": {
"Dns": [
"8.8.8.8",
"8.8.4.4"
]
}
的resolv.conf有config.json以下輸入默認機器
[email protected]:/etc$
[email protected]:/etc$ cat /etc/resolv.conf
search <company name>
nameserver 10.0.2.3
[email protected]:/etc$
本機坐在代理之後,我使用kitematic創建默認機器
Kitematic通過自定義腳本將設置代理,並開始啓動kitematic
推薦和所有圖像都在kitematic開始顯示。但不能拉任何圖像
創建新機也給予警告與--dns
選項創建
PS C:\Program Files\Docker Toolbox\kitematic> docker-machine create -d virtualbox --engine-opt dns=8.8.8.8 test
Running pre-create checks...
(test) Unable to get the latest Boot2Docker ISO release version: Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp 192.30.253.116:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Creating machine...
(test) Unable to get the latest Boot2Docker ISO release version: Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp 192.30.253.116:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
該機還擁有/etc/resolv.conf
沒有8.8.8.8
[email protected]:~$
[email protected]:~$ cat /etc/resolv.conf
search <company name>
nameserver 10.0.2.3
[email protected]:~$
PS:發行後添加HTTP_PROXY解決了/ var/lib/boot2docker/profile