The property proxies specifies proxy environment variables to be automatically set on containers, and set as --build-arg on containers used during docker build. A "default" set of proxies can be configured, and will be used for any docker daemon that the client connects to, or a configuration per host (docker daemon), for example, “https://docker-daemon1.example.com”. The following properties can be set for each environment:
| Property | Description |
|---|---|
httpProxy | Default value of HTTP_PROXY and http_proxy for containers, and as --build-arg on docker build |
httpsProxy | Default value of HTTPS_PROXY and https_proxy for containers, and as --build-arg on docker build |
ftpProxy | Default value of FTP_PROXY and ftp_proxy for containers, and as --build-arg on docker build |
noProxy | Default value of NO_PROXY and no_proxy for containers, and as --build-arg on docker build |
These settings are used to configure proxy settings for containers only, and not used as proxy settings for the docker CLI or the dockerd daemon. Refer to the environment variables and HTTP/HTTPS proxy sections for configuring proxy settings for the cli and daemon.
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.
参考链接:https://docs.docker.com/engine/reference/commandline/cli/