| :----------- | :---------------------------------------------------------------------------------- |
| `httpProxy` | Sets the `HTTP_PROXY` and `http_proxy` environment variables and build arguments. |
| `httpsProxy` | Sets the `HTTPS_PROXY` and `https_proxy` environment variables and build arguments. |
| `ftpProxy` | Sets the `FTP_PROXY` and `ftp_proxy` environment variables and build arguments. |
| `noProxy` | Sets the `NO_PROXY` and `no_proxy` environment variables and build arguments. |
| `allProxy` | Sets the `ALL_PROXY` and `all_proxy` environment variables and build arguments. |
These settings are used to configure proxy environment variables for containers
only, and not used as proxy settings for the Docker CLI or the Docker Engine
itself.
Refer to the [environment variables](/reference/cli/docker/#environment-variables)
and [configure the Docker daemon to use a proxy server](/manuals/engine/daemon/proxy.md)
sections for configuring proxy settings for the CLI and daemon.
### Run containers with a proxy configuration
When you start a container, its proxy-related environment variables are set
to reflect your proxy configuration in `~/.docker/config.json`.
For example, assuming a proxy configuration like the example
shown in the [earlier section](#configure-the-docker-client), environment
variables for containers that you run are set as follows:
```console
$ docker run --rm alpine sh -c 'env | grep -i _PROXY'
https_proxy=http://proxy.example.com:3129
HTTPS_PROXY=http://proxy.example.com:3129
http_proxy=http://proxy.example.com:3128
HTTP_PROXY=http://proxy.example.com:3128
no_proxy=*.test.example.com,.example.org,127.0.0.0/8
NO_PROXY=*.test.example.com,.example.org,127.0.0.0/8
```
### Build with a proxy configuration
When you invoke a build, proxy-related build arguments are pre-populated
automatically, based on the proxy settings in your Docker client configuration
file.
Assuming a proxy configuration like the example shown in the
[earlier section](#configure-the-docker-client), environment
are set as follows during builds:
```console
$ docker build \
--no-cache \
--progress=plain \
- <<EOF
FROM alpine
RUN env | grep -i _PROXY
EOF
```
```console
#5 [2/2] RUN env | grep -i _PROXY
#5 0.100 HTTPS_PROXY=https://proxy.example.com:3129