Ich bin versucht, eine Entwicklungsumgebung hinter einem Unternehmens-Proxy-Server mit Docker einzurichten. Versuchen Sie es, ich kann den Andock-Container nicht mit dem Proxy-Server sprechen.apt-get in Docker hinter Organ-
Der Proxy-Server und apt-get funktionieren auf dem Host, die Ubuntu 12.04
Das erste, was in der Dockerfile getan ist versucht, die Proxy-Variablen einzurichten:
FROM ubuntu
RUN echo 'Acquire::http { Proxy "http://my.proxy.net:8000"; };' >> /etc/apt/apt.conf.d/01proxy
ENV HTTP_PROXY http://my.proxy.net:8000
ENV http_proxy http://my.proxy.net:8000
ENV HTTPS_PROXY https://my.proxy.net:8000
ENV https_proxy https://my.proxy.net:8000
RUN apt-get update && apt-get install -y build-essential
Es zieht das Bild in Ordnung, legen sie die Variablen, aber wenn es apt-get update bekommt zu, versucht es für eine kleine Weile und dann irgendwie:
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'my.proxy.net'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'my.proxy.net'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'my.proxy.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Diese Variablen I eingerichtet haben sind konsistent mit dem Host-Linux installieren (Ubuntu 12.04 auf VirtualBox, wenn diese Fragen)
ich auch haben/etc/default/Docker eingerichtet mit:
export http_proxy="http://my.proxy.net:8000"
export http_proxy="https://my.proxy.net:8000"
Irgendwelche Gedanken?
UPDATE:
Es sieht aus wie dies ein Problem mit DNS ist, die nicht unbedingt der Proxy-Server. Der Host /etc/resolve.conf enthält:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
search dhcp.mycompany.com
Der Wirt ist ein virtualbox vm auf einem Windows 7-Box ausgeführt wird, und ich habe verschiedene unausgereifte Lösungen gefunden, die meist scheinen nicht zu funktionieren. Egal, was ich versuche, kann ich nicht bekommen sie den Hostnamen des Proxy-Servers