Proxy Repository for Docker

Docker Hub is the common registry used by all image creators and consumers. To reduce duplicate downloads and improve download speeds for your developers and CI servers, you should proxy Docker Hub and any other registry you use for Docker images.

To proxy a Docker registry, you simply create a new docker (proxy) as documented in Repository Management.

Minimal configuration steps are:

  • Define Name
  • Define URL for Remote storage
  • Enable Docker V1 API support, if required by the remote repository
  • Select correct Docker index, further configure Location of Docker index if needed
  • Select Blob store for Storage

If you intend users to access the proxy repository directly, you may wish to configure a Repository Connector as explained in SSL and Repository Connector Configuration. This is not necessary for proxy content that is accessed via a Docker group.

The Remote Storage has to be set to the URL of the remote registry you want to proxy. The configuration for proxying Docker Hub uses the URL https://registry-1.docker.io for the Remote storage URL.

The Proxy configuration for a Docker proxy repository includes a configuration URL to access the Docker Index. The index is used for requests related to searches, users, docker tokens and other aspects. The registry the index are typically co-hosted by the same provider, but can use different URLs. E.g. the index for Docker Hub is exposed at https://index.docker.io/. The default option of Use proxy registry (specified above) will attempt to retrieve any index data from the same URL configured as the Remote storage URL. The option to Use Docker Hub fulfills any index related requests by querying the Docker Hub index at https://index.docker.io/. This configuration is desired when the proxy repository is Docker Hub itself or any of its mirrors. The option to use a Custom index allows you to specify the URL of the index for the remote repository.  It is important to configure a correct pair of Remote Storage URL and Docker Index URL. In case of a mismatch, search results potentially do not reflect the content of the remote repository and other problems can occur.

Just to recap, in order to configure a proxy for Docker Hub you configure the Remote Storage URL to https://registry-1.docker.io, enable Docker V1 API support and for the choice of Docker Index select the Use Docker Hub option.