Skip to main content

Docker Registry

Docker containers have revolutionized how applications and their infrastructure are packaged and deployed. Docker Hub is a registry for container images.

Nexus Repository supports hosting and proxying Docker registries. Multiple repositories may be made available in a single endpoint to client-side tools as a repository group. This reduces the time and bandwidth usage of accessing Docker images in a registry as well as sharing images in hosted repositories.

Docker Registry Domain

The Docker client has strict requirements for the path where images are hosted in a registry. While you may define the domain of the repository, the registry may not be located under a subdirectory of that domain.

The client's registry is specified with a domain, a port, and a path to specific images in the registry.

example.domain:443/some/custom/image

Nexus Repository Registry Path

Nexus Repository exposes registries with a common repository path. A Docker image in the repository "docker-hosted" is accessible at the below URL:

example.domain:443/nexus3/repository/docker-hosted/some/custom/image

Example

Basic URL Structure

example.domain

hostname

443

port

/nexus3

application context path (optional)

/repository/docker-hosted

base registry path

/some/custom/image

specific image path in the registry

Docker Client Limitations

The Docker client does not accept the application context path or base registry path as Docker needs the registry exposed at the root of the host + port that it is accessing.

Nexus Repository manages this Docker limitation with the following methods:

  1. Using a subdomain connector to forward subdomains to the correct repository (available for PRO licenses)

  2. Using a reverse proxy to redirect traffic to the correct application context path

  3. Using port connectors (limit to only 20 connectors/repositories)

Supporting OCI Images

The OCI specification versions 1.0.0 and 1.0.1 are supported within Docker repositories. This format support is available as of the 3.71 release.

As part of OCI support the following are some of the changes provided:

  • Blob upload allows uploads of any arbitrary binary format ("application/octet-stream" content-type) when "Strict Content Type Validation" is enabled

  • The "Location" header is part of the manifest upload response

  • Endpoint that allows user to delete tag added: DELETE /v2/{name}/manifests/{tag}

  • The Docker image "mediaType" property is now optional

Visit the Open Containers Initiative documentation for details on the format.

Docker Manifest Lists

Docker manifest lists allow a manifest to represent support for multiple architectures while maintaining a single image:tag reference format.

See the Docker documentation for information on Docker's schema specification.

Supported Docker Client

The minimum version of the Docker client that works with Nexus Repository is version 1.8 though we highly recommend staying on the latest version when possible. Docker is a fast-moving project and requires the usage of current operating system versions and tools.

Use the official documentation as a reference and help for your usage.