Merge pull request #8061 from ChaosGramer/patch-1

Adding proxy wildcard documentation
This commit is contained in:
L-Hudson 2019-01-28 12:55:49 -05:00 committed by GitHub
commit 9c4de0b3ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 3 deletions

View File

@ -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 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 ```conf
[Service] [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: Or, if you are behind an HTTPS proxy server:
```conf ```conf
[Service] [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: 4. Flush changes: