From 246138598d2045c419d35a04279b8f42689d9ec7 Mon Sep 17 00:00:00 2001 From: Richard Scothern Date: Wed, 26 Aug 2015 11:02:05 -0700 Subject: [PATCH] Add some clarifying documentation for pull through cache configuration Signed-off-by: Richard Scothern --- docs/configuration.md | 57 +++++++++++++++++++++++++++++++++++++++++++ docs/mirror.md | 2 ++ 2 files changed, 59 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 3563ef51..4aebb25e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -216,6 +216,10 @@ information about each option that appears later in this page. timeout: 3s interval: 10s threshold: 3 + proxy: + remoteurl: https://registry-1.docker.io + username: [username] + password: [password] In some instances a configuration option is **optional** but it contains child options marked as **required**. This indicates that you can omit the parent with @@ -1940,6 +1944,59 @@ The TCP address to connect to, including a port number. +## Proxy + + proxy: + remoteurl: https://registry-1.docker.io + username: [username] + password: [password] + +Proxy enables a registry to be configured as a pull through cache to the official Docker Hub. See [mirror.md](mirror.md) for more information + + + + + + + + + + + + + + + + + + + + + + +
ParameterRequiredDescription
+ remoteurl + + yes + + The URL of the official Docker Hub +
+ username + + no + + The username of the Docker Hub account +
+ password + + no + + The password for the official Docker Hub account +
+ +To enable pulling private repositories (e.g. `batman/robin`) a username and password for user `batman` must be specified. Note: These private repositories will be stored in the proxy cache's storage and relevant measures should be taken to protect access to this. + + ## Example: Development configuration The following is a simple example you can use for local development: diff --git a/docs/mirror.md b/docs/mirror.md index 5a928c14..1abd33f2 100644 --- a/docs/mirror.md +++ b/docs/mirror.md @@ -8,6 +8,8 @@ draft = "true" A v2 Registry can be configured as a pull through cache. In this mode a Registry responds to all normal docker pull requests but stores all content locally. +NOTE: Currently this feature can only be used to proxy against the official Docker Hub. + ## Why? If you have multiple instances of Docker running in your environment (e.g., multiple physical or virtual machines, all running the Docker daemon), each time one of them requires an image that it doesn’t have it will go out to the internet and fetch it from the public Docker registry. By running a local registry mirror, you can keep most of the image fetch traffic on your local network.