docs: update some examples for proxy configuration

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 68284ff591)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-04-30 12:08:28 +02:00
parent 7ab2d19a1e
commit ffe40dc6b6
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
3 changed files with 19 additions and 12 deletions

View File

@ -1974,10 +1974,11 @@ corresponding `ARG` instruction in the Dockerfile.
- `NO_PROXY` - `NO_PROXY`
- `no_proxy` - `no_proxy`
To use these, simply pass them on the command line using the flag: To use these, pass them on the command line using the `--build-arg` flag, for
example:
```bash ```console
--build-arg <varname>=<value> $ docker build --build-arg HTTPS_PROXY=https://my-proxy.example.com .
``` ```
By default, these pre-defined variables are excluded from the output of By default, these pre-defined variables are excluded from the output of

View File

@ -238,10 +238,12 @@ be set for each environment:
* `ftpProxy` (sets the value of `FTP_PROXY` and `ftp_proxy`) * `ftpProxy` (sets the value of `FTP_PROXY` and `ftp_proxy`)
* `noProxy` (sets the value of `NO_PROXY` and `no_proxy`) * `noProxy` (sets the value of `NO_PROXY` and `no_proxy`)
> **Warning**: Proxy settings may contain sensitive information (for example, > **Warning**
> if the proxy requires authentication). Environment variables are stored as >
> plain text in the container's configuration, and as such can be inspected > Proxy settings may contain sensitive information (for example, if the proxy
> through the remote API or committed to an image when using `docker commit`. > requires authentication). Environment variables are stored as plain text in
> the container's configuration, and as such can be inspected through the remote
> API or committed to an image when using `docker commit`.
Once attached to a container, users detach from it and leave it running using Once attached to a container, users detach from it and leave it running using
the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable
@ -301,13 +303,13 @@ Following is a sample `config.json` file:
"proxies": { "proxies": {
"default": { "default": {
"httpProxy": "http://user:pass@example.com:3128", "httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "http://user:pass@example.com:3128", "httpsProxy": "https://my-proxy.example.com:3129",
"noProxy": "http://user:pass@example.com:3128", "noProxy": "intra.mycorp.example.com",
"ftpProxy": "http://user:pass@example.com:3128" "ftpProxy": "http://user:pass@example.com:3128"
}, },
"https://manager1.mycorp.example.com:2377": { "https://manager1.mycorp.example.com:2377": {
"httpProxy": "http://user:pass@example.com:3128", "httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "http://user:pass@example.com:3128" "httpsProxy": "https://my-proxy.example.com:3129"
}, },
} }
} }

View File

@ -438,8 +438,12 @@ A Dockerfile is similar to a Makefile.
* `NO_PROXY` * `NO_PROXY`
* `no_proxy` * `no_proxy`
To use these, simply pass them on the command line using the `--build-arg To use these, pass them on the command line using `--build-arg` flag, for
<varname>=<value>` flag. example:
```
$ docker build --build-arg HTTPS_PROXY=https://my-proxy.example.com .
```
**ONBUILD** **ONBUILD**
-- `ONBUILD [INSTRUCTION]` -- `ONBUILD [INSTRUCTION]`