diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index 16e61df8f4..57d7863603 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -96,18 +96,34 @@ you need to add this configuration in the Docker systemd service file. ``` 3. If you have internal Docker registries that you need to contact without - proxying you can specify them via the `NO_PROXY` environment variable: + proxying you can specify them via the `NO_PROXY` environment variable. + The `NO_PROXY` variable specifies a string that contains comma-separated + values for hosts that should be excluded from proxying. These are the + options you can specify to exclude hosts: + * IP address prefix (`1.2.3.4`) or in CIDR notation (`1.2.3.4/8`) + * Domain name, or a special DNS label (`*`) + * A domain name matches that name and all subdomains. A domain name with + a leading "." matches subdomains only. For example, given the domains + `foo.example.com` and `example.com`: + * `example.com` matches `example.com` and `foo.example.com`, and + * `.example.com` matches only `foo.example.com` + * A single asterisk (`*`) indicates that no proxying should be done + * Literal port numbers are accepted by IP address prefixes (`1.2.3.4:80`) + and domain names (`foo.example.com:80`) + + Config examples: + ```conf [Service] - Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com" + Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp" ``` Or, if you are behind an HTTPS proxy server: ```conf [Service] - Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com" + Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,docker-registry.example.com,.corp" ``` 4. Flush changes: