# Configure http proxy?

**URL:** <https://forums.docker.com/t/configure-http-proxy/11858>\
**Category:** Windows Server 2016\
**Created:** [May 11, 2016, 8:38am UTC](https://forums.docker.com/t/configure-http-proxy/11858 "2016-05-11T08:38:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mh2015](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mh2015/32/3019_2.png) [@mh2015](https://forums.docker.com/u/mh2015)\
**Post date:** [May 11, 2016, 8:38am UTC](https://forums.docker.com/t/configure-http-proxy/11858/1 "2016-05-11T08:38:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![patricklang](https://avatars.discourse-cdn.com/v4/letter/p/dec6dc/32.png) [@patricklang](https://forums.docker.com/u/patricklang)\
**Post date:** [May 11, 2016, 5:00pm UTC](https://forums.docker.com/t/configure-http-proxy/11858/2 "2016-05-11T17:00:17Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![mberndtgen](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/mberndtgen/32/5253_2.png) [@mberndtgen](https://forums.docker.com/u/mberndtgen)\
**Post date:** [May 11, 2016, 9:29pm UTC](https://forums.docker.com/t/configure-http-proxy/11858/3 "2016-05-11T21:29:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kalute](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@kalute](https://forums.docker.com/u/kalute)\
**Post date:** [August 22, 2017, 4:40pm UTC](https://forums.docker.com/t/configure-http-proxy/11858/4 "2017-08-22T16:40:49Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![anilhl](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@anilhl](https://forums.docker.com/u/anilhl)\
**Post date:** [March 30, 2020, 11:11pm UTC](https://forums.docker.com/t/configure-http-proxy/11858/5 "2020-03-30T23:11:53Z")

</div>

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

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

```auto
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 ?
```

---

<div class="post-metadata">

**Author:** ![dockerfordevops](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@dockerfordevops](https://forums.docker.com/u/dockerfordevops)\
**Post date:** [May 15, 2020, 3:09pm UTC](https://forums.docker.com/t/configure-http-proxy/11858/6 "2020-05-15T15:09:49Z")

</div>

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")`
