mirror of https://github.com/docker/docs.git
Correct proxies documentation for Docker Desktop (mac) (#11069)
* Update index.md The proxies set in the Docker Desktop settings are actually not propagated in the containers automatically. The rationale being that we want the same UX on Windows/Mac and as on Linux. Related to https://github.com/docker/docker.github.io/pull/10890 * Minor update Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
This commit is contained in:
parent
dbd9ba12f9
commit
dba80f3631
|
@ -175,28 +175,26 @@ For more information, see:
|
||||||
#### Proxies
|
#### Proxies
|
||||||
|
|
||||||
Docker Desktop detects HTTP/HTTPS Proxy Settings from macOS and automatically
|
Docker Desktop detects HTTP/HTTPS Proxy Settings from macOS and automatically
|
||||||
propagates these to Docker and to your containers. For example, if you set your
|
propagates these to Docker. For example, if you set your
|
||||||
proxy settings to `http://proxy.example.com`, Docker uses this proxy when
|
proxy settings to `http://proxy.example.com`, Docker uses this proxy when
|
||||||
pulling containers.
|
pulling containers.
|
||||||
|
|
||||||
When you start a container, your proxy settings propagate into the containers.
|
Your proxy settings, however, will not be propagated into the containers you start.
|
||||||
For example:
|
If you wish to set the proxy settings for your containers, you need to define
|
||||||
|
environment variables for them, just like you would do on Linux, for example:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -it alpine env
|
$ docker run -e HTTP_PROXY=http://proxy.example.com:3128 alpine env
|
||||||
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
HOSTNAME=b7edf988b2b5
|
HOSTNAME=b7edf988b2b5
|
||||||
TERM=xterm
|
TERM=xterm
|
||||||
HOME=/root
|
HOME=/root
|
||||||
HTTP_PROXY=http://proxy.example.com:3128
|
HTTP_PROXY=http://proxy.example.com:3128
|
||||||
http_proxy=http://proxy.example.com:3128
|
|
||||||
no_proxy=*.local, 169.254/16
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can see from the above output that the `HTTP_PROXY`, `http_proxy`, and
|
For more information on setting environment variables for running containers,
|
||||||
`no_proxy` environment variables are set. When your proxy configuration changes,
|
see [Set environment variables](/engine/reference/commandline/run/#set-environment-variables--e---env---env-file).
|
||||||
Docker restarts automatically to pick up the new settings. If you have any
|
|
||||||
containers that you would like to keep running across restarts, you should consider using [restart policies](/engine/reference/run/#restart-policies-restart).
|
|
||||||
|
|
||||||
#### Network
|
#### Network
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue