1
0
mirror of https://github.com/rancher/os.git synced 2025-07-21 02:19:08 +00:00

Add some specific examples for registry mirror settings

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2017-06-12 12:36:04 +10:00
parent d52b995450
commit d0bfdb444e

View File

@ -28,7 +28,7 @@ You can also customize Docker after it's been started using `ros config`.
$ sudo ros config set rancher.docker.storage_driver overlay $ sudo ros config set rancher.docker.storage_driver overlay
``` ```
#### Valid Keys for Docker #### User Docker settings
Many of the standard Docker daemon arguments can be placed under the `rancher.docker` key. The command needed to start the Docker daemon will be generated based on these arguments. The following arguments are currently supported. Many of the standard Docker daemon arguments can be placed under the `rancher.docker` key. The command needed to start the Docker daemon will be generated based on these arguments. The following arguments are currently supported.
@ -77,7 +77,7 @@ rancher:
storage_driver: overlay storage_driver: overlay
``` ```
#### Valid Keys for System Docker #### System Docker settings
All daemon arguments shown in the first table are also available to System Docker. The following are also supported. All daemon arguments shown in the first table are also available to System Docker. The following are also supported.
@ -85,3 +85,40 @@ Key | Value | Default | Description
---|---|---| --- ---|---|---| ---
`extra_args` | List of Strings | `[]` | Arbitrary daemon arguments, appended to the generated command `extra_args` | List of Strings | `[]` | Arbitrary daemon arguments, appended to the generated command
`environment` | List of Strings (optional) | `[]` | `environment` | List of Strings (optional) | `[]` |
### Using a pull through registry mirror
There are 3 Docker engines that can be configured to use the pull-through Docker Hub registry mirror cache:
```
#cloud-config
rancher:
bootstrap_docker:
registry_mirror: "http://10.10.10.23:5555"
docker:
registry_mirror: "http://10.10.10.23:5555"
system_docker:
registry_mirror: "http://10.10.10.23:5555"
```
`bootstrap_docker` is used to prepare and initial network and pull any cloud-config options that can be used to configure the final network configuration and System-docker - its very unlikely to pull any images.
A successful pull through mirror cache request by System-docker looks like:
```
[root@rancher-dev rancher]# system-docker pull alpine
Using default tag: latest
DEBU[0201] Calling GET /v1.23/info
> WARN[0201] Could not get operating system name: Error opening /usr/lib/os-release: open /usr/lib/os-release: no such file or directory
WARN[0201] Could not get operating system name: Error opening /usr/lib/os-release: open /usr/lib/os-release: no such file or directory
DEBU[0201] Calling POST /v1.23/images/create?fromImage=alpine%3Alatest
DEBU[0201] hostDir: /etc/docker/certs.d/10.10.10.23:5555
DEBU[0201] Trying to pull alpine from http://10.10.10.23:5555/ v2
DEBU[0204] Pulling ref from V2 registry: alpine:latest
DEBU[0204] pulling blob "sha256:2aecc7e1714b6fad58d13aedb0639011b37b86f743ba7b6a52d82bd03014b78e" latest: Pulling from library/alpine
DEBU[0204] Downloaded 2aecc7e1714b to tempfile /var/lib/system-docker/tmp/GetImageBlob281102233 2aecc7e1714b: Extracting 1.99 MB/1.99 MB
DEBU[0204] Untar time: 0.161064213s
DEBU[0204] Applied tar sha256:3fb66f713c9fa9debcdaa58bb9858bd04c17350d9614b7a250ec0ee527319e59 to 841c99a5995007d7a66b922be9bafdd38f8090af17295b4a44436ef433a2aecc7e1714b: Pull complete
Digest: sha256:0b94d1d1b5eb130dd0253374552445b39470653fb1a1ec2d81490948876e462c
Status: Downloaded newer image for alpine:latest
```