Configure http proxy?

How can I configure the docker daemon on W2K16 TP5 to use an http proxy?

I’m pretty sure the containers should inherit the host’s configuration. If you’re hitting an error, can you share the steps you’re running?

Thanks!

Do you want to access that proxy from within a container, perhaps? I’m running cntlm in a container, have set up environment variables http_proxy and https_proxy, and services, scripts etc. have Internet access without problems. Give us some more details about what you want to do, there might be a solution.

@mh2015 – We’re currently working on planning for our next Windows release, and increased support for http proxy with containers is on our list of items to investigate. If this is still a need for you, can you provide more details on the setup/use-case that you would like to see enabled?

I’m following the steps to install docker on Windows 2016 server https://docs.docker.com/ee/docker-ee/windows/docker-ee/ .

When I run the command ```
docker run hello-world:nanoserver-sac2016

it failed with message 
Unable to find image 'hello-world:nanoserver-sac2016' locally
C:\Program Files\Docker\docker.exe: 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 'C:\Program Files\Docker\docker.exe run --help'.

I think it is due to proxy config on server. How to resolve it ?

You need an environment viriable with respective value:

HTTP_PROXY="http://USERNAME:PASSWORD@[your.proxy.server]:[port]"
HTTPS_PROXY="https://USERNAME:PASSWORD@[your.proxy.server]:[port]"

On windows you may use PowerShell to set the value like this:

[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://127.0.0.1:8888", "Machine")