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. You may expose multiple repositories to the client-side tools in a single URL as a repository group. This reduces the time and bandwidth usage of accessing Docker images in a registry as well as sharing your images in hosted repositories.

Note

Please note that Sonatype Nexus Repository does not currently provide full support for the Open Container Initiative (OCI).

Tasks such as the Docker - Delete unused manifests and images may produce undesired results when run against an OCI image, including unexpectedly deleting some manifests.

Docker Port Scalability

The Docker client has strict requirements for the path where images are hosted in a registry. While you may configure the source repository to use, it is not possible to use an arbitrary base path where images are stored in a registry.

The client's registry is specified with a hostname domain and port with a path to specific images in the registry. You are not able to specify a registry application path.

example.domain:443/some/custom/image

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

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

  • 443 = port; the Docker client expects secure connectivity (See our SSL documentation)

  • /nexus3 = application context path

  • /repository/docker-hosted = base registry path

  • /some/custom/image = specific image path in the registry

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)

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.