adding https documentation (#2861)

This commit is contained in:
Frank B Greco Jr 2017-04-19 06:59:40 -05:00 committed by John Mulhausen
parent 37e6e6e187
commit 59e4718500
1 changed files with 26 additions and 5 deletions

View File

@ -60,17 +60,16 @@ To accomplish this, set the following flags in the `daemon.json` file:
}
```
### HTTP proxy
### HTTP/HTTPS proxy
>**Note:** The same instructions work for `HTTS_PROXY` as well.
The Docker daemon uses the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environmental variables in
its start-up environment to configure HTTP or HTTPS proxy behavior. You cannot configure
The Docker daemon uses the `HTTP_PROXY` and `NO_PROXY` environmental variables in
its start-up environment to configure HTTP proxy behavior. You cannot configure
these environment variables using the `daemon.json` file.
This example overrides the default `docker.service` file.
If you are behind an HTTP proxy server, for example in corporate settings,
If you are behind an HTTP or HTTPS proxy server, for example in corporate settings,
you will need to add this configuration in the Docker systemd service file.
1. Create a systemd drop-in directory for the docker service:
@ -87,6 +86,15 @@ you will need to add this configuration in the Docker systemd service file.
Environment="HTTP_PROXY=http://proxy.example.com:80/"
```
Or, if you are behind an HTTPS proxy server, create a file called
`/etc/systemd/system/docker.service.d/https-proxy.conf`
that adds the `HTTPS_PROXY` environment variable:
```conf
[Service]
Environment="HTTPS_PROXY=https://proxy.example.com:443/"
```
3. If you have internal Docker registries that you need to contact without
proxying you can specify them via the `NO_PROXY` environment variable:
@ -94,6 +102,12 @@ you will need to add this configuration in the Docker systemd service file.
Environment="HTTP_PROXY=http://proxy.example.com:80/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com"
```
Or, if you are behind an HTTPS proxy server:
```conf
Environment="HTTPS_PROXY=https://proxy.example.com:443/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com"
```
4. Flush changes:
```bash
@ -113,6 +127,13 @@ you will need to add this configuration in the Docker systemd service file.
Environment=HTTP_PROXY=http://proxy.example.com:80/
```
Or, if you are behind an HTTPS proxy server:
```bash
$ systemctl show --property=Environment docker
Environment=HTTPS_PROXY=https://proxy.example.com:443/
```
## Manually creating the systemd unit files
When installing the binary without a package, you may want