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`
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
--build-arg <varname>=<value>
```console
$ docker build --build-arg HTTPS_PROXY=https://my-proxy.example.com .
```
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`)
* `noProxy` (sets the value of `NO_PROXY` and `no_proxy`)
> **Warning**: Proxy settings may contain sensitive information (for example,
> if the proxy 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`.
> **Warning**
>
> Proxy settings may contain sensitive information (for example, if the proxy
> 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
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": {
"default": {
"httpProxy": "http://user:pass@example.com:3128",
"httpsProxy": "http://user:pass@example.com:3128",
"noProxy": "http://user:pass@example.com:3128",
"httpsProxy": "https://my-proxy.example.com:3129",
"noProxy": "intra.mycorp.example.com",
"ftpProxy": "http://user:pass@example.com:3128"
},
"https://manager1.mycorp.example.com:2377": {
"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`
To use these, simply pass them on the command line using the `--build-arg
<varname>=<value>` flag.
To use these, pass them on the command line using `--build-arg` flag, for
example:
```
$ docker build --build-arg HTTPS_PROXY=https://my-proxy.example.com .
```
**ONBUILD**
-- `ONBUILD [INSTRUCTION]`