2017-04-19 2 views
1

Ich versuche, Bilder zur Standard-Docker-Maschine zu ziehen. Aber ich bekomme immerDocker-Pull ist fehlgeschlagen, weil die Anfrage abgebrochen wurde, während auf die Verbindung gewartet wurde.

[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$ 

Auch wenn ich gebe --dns gleiche Option Fehler

[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$ 

Hinzufügen versucht DNS zu config.json der Standard-Maschinen

"EngineOptions": { 
    "Dns": [ 
     "8.8.8.8", 
     "8.8.4.4" 
    ] 
} 

resolv.conf hat folgender Eintrag in der Standardmaschine

[email protected]:/etc$ 
[email protected]:/etc$ cat /etc/resolv.conf 
search <company name> 
nameserver 10.0.2.3 
[email protected]:/etc$ 

Diese Maschine hinter dem Proxy sitzt, und ich bin mit kitematic für die Erstellung von Standard-Maschinen

Kitematic gestartet von einem benutzerdefinierten Skript, das Proxies und startet kitematic

empfohlen und alle Bilder angezeigt werden zu Beginn des kitematic gesetzt wird. Aber kann nicht ziehen keine Bilder

neue Maschine Erstellen auch

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. 

Maschine mit --dns Option erstellt ergibt Warnung hat auch /etc/resolv.conf nicht als 8.8.8.8

[email protected]:~$ 
[email protected]:~$ cat /etc/resolv.conf 
search <company name> 
nameserver 10.0.2.3 
[email protected]:~$ 

PS: Problem gelöst nach der Zugabe von HTTP_PROXY zu/var/lib/boot2docker/profil

Antwort

2

Gefundene Lösung

Entweder hinzufügen HTTP_PROXY-/var/lib/boot2docker/profile oder

mit --engine-env HTTP_PROXY=IP:PORT Docker Maschine erstellen

Verwandte Themen