From f3960c3d311ded1ea2fa56647e2e38e118d35639 Mon Sep 17 00:00:00 2001 From: ChaosGramer Date: Tue, 22 Jan 2019 11:55:03 +0100 Subject: [PATCH 1/6] Adding proxy wildcard documentation Wildcard documentation was missing in the official docs --- config/daemon/systemd.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index 16e61df8f4..77d578e7b8 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -109,6 +109,12 @@ you need to add this configuration in the Docker systemd service file. [Service] Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com" ``` + + The NO_PROXY variable accepts wildcards. You just need to have a value starting with a dot: + ```conf + [Service] + Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,.somecorporation.com" + ``` 4. Flush changes: From 61be95d7f6afd5c74997aff23efa7cc017ef2b1b Mon Sep 17 00:00:00 2001 From: "Jan Vaehsen (Windows)" Date: Fri, 25 Jan 2019 13:10:06 +0100 Subject: [PATCH 2/6] add documentation for NO_PROXY var in systemd config --- config/daemon/systemd.md | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index 77d578e7b8..2cc2608c57 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -96,24 +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 have to specify the excluded 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. Example: + ``` + Given the domains foo.example.com and example.com. + "foo.com" matches "foo.com" and "bar.foo.com" + ".foo.com" mataches only "bar.foo.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" - ``` - - The NO_PROXY variable accepts wildcards. You just need to have a value starting with a dot: - ```conf - [Service] - Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,.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: From d38627d05a70b62e2d51496621ed90f1c404f5cb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Jan 2019 14:43:49 +0100 Subject: [PATCH 3/6] Update config/daemon/systemd.md Co-Authored-By: ChaosGramer --- config/daemon/systemd.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index 2cc2608c57..c46abef54a 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -98,7 +98,19 @@ 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. - The `NO_PROXY` variable specifies a string that contains comma-separated values for hosts that should be excluded from proxying. + 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`) These are the options you have to specify the excluded hosts: * IP address prefix (`1.2.3.4`) or in CIDR notation (`1.2.3.4/8`) * Domain name, or a special DNS label (`*`) From 46f76f241ec9cbac543c42f5863dbce24848f932 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Jan 2019 14:44:13 +0100 Subject: [PATCH 4/6] Update config/daemon/systemd.md Co-Authored-By: ChaosGramer --- config/daemon/systemd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index c46abef54a..d9abe05b62 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -121,7 +121,7 @@ you need to add this configuration in the Docker systemd service file. "foo.com" matches "foo.com" and "bar.foo.com" ".foo.com" mataches only "bar.foo.com" ``` - * A single asterisk (*) indicates that no proxying should be done + * 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: From 71e41e3d95d6063ce23f219a281e329158d68d80 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Jan 2019 14:44:20 +0100 Subject: [PATCH 5/6] Update config/daemon/systemd.md Co-Authored-By: ChaosGramer --- config/daemon/systemd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index d9abe05b62..72038ecec9 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -111,7 +111,7 @@ you need to add this configuration in the Docker systemd service file. * 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`) - These are the options you have to specify the excluded hosts: + 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 From 9edcd49141711b6b8c2f1dff3487d6b16945f311 Mon Sep 17 00:00:00 2001 From: "Jan Vaehsen (Windows)" Date: Fri, 25 Jan 2019 15:17:28 +0100 Subject: [PATCH 6/6] resolve suggestion conflict --- config/daemon/systemd.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/config/daemon/systemd.md b/config/daemon/systemd.md index 72038ecec9..57d7863603 100644 --- a/config/daemon/systemd.md +++ b/config/daemon/systemd.md @@ -105,24 +105,12 @@ you need to add this configuration in the Docker systemd service file. * 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`; + `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`) - 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. Example: - ``` - Given the domains foo.example.com and example.com. - "foo.com" matches "foo.com" and "bar.foo.com" - ".foo.com" mataches only "bar.foo.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: