Merge pull request #929 from RichardScothern/docs

Add some clarifying documentation for pull through cache configuration
This commit is contained in:
Olivier Gambier 2015-08-27 16:41:22 -07:00
commit 21edffdee1
2 changed files with 59 additions and 0 deletions

View file

@ -216,6 +216,10 @@ information about each option that appears later in this page.
timeout: 3s timeout: 3s
interval: 10s interval: 10s
threshold: 3 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 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 options marked as **required**. This indicates that you can omit the parent with
@ -1943,6 +1947,59 @@ The TCP address to connect to, including a port number.
</tr> </tr>
</table> </table>
## 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
<table>
<tr>
<th>Parameter</th>
<th>Required</th>
<th>Description</th>
</tr>
<tr>
<td>
<code>remoteurl</code>
</td>
<td>
yes
</td>
<td>
The URL of the official Docker Hub
</td>
</tr>
<tr>
<td>
<code>username</code>
</td>
<td>
no
</td>
<td>
The username of the Docker Hub account
</td>
</tr>
<tr>
<td>
<code>password</code>
</td>
<td>
no
</td>
<td>
The password for the official Docker Hub account
</td>
</tr>
</table>
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 ## Example: Development configuration
The following is a simple example you can use for local development: The following is a simple example you can use for local development:

View file

@ -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. 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? ## 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 doesnt 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. 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 doesnt 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.