Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Docker registry and repository

Tags:

docker

People also ask

What is Docker registry and Docker repository?

A Docker registry is a service that hosts and distributes Docker images. In many cases, a registry will consist of multiple repositories which contain images related to a specific project. Within a given repository tags are used to differentiate between versions of an image (e.g. ubuntu/httpd:version2.

What is a Docker registry?

A Docker registry is a storage and distribution system for named Docker images. The same image might have multiple different versions, identified by their tags. A Docker registry is organized into Docker repositories , where a repository holds all the versions of a specific image.

What is a Docker image repository?

Docker Hub repositories allow you share container images with your team, customers, or the Docker community at large. Docker images are pushed to Docker Hub through the docker push command. A single Docker Hub repository can hold many Docker images (stored as tags).

What do you mean by registries and repositories?

The store that actually contains those assets is the repository. A repository, like the gold repository in Fort Knox, stores actual assets and typically controls access to those assets. So, while a registry simply records official information that relates to an asset, the repository stores the assets themselves.


Docker registry is a service that is storing your docker images.

Docker registry could be hosted by a third party, as public or private registry, like one of the following registries:

  • Docker Hub,
  • Quay,
  • Google Container Registry,
  • AWS Container Registry

or you can host the docker registry by yourself
(see https://docs.docker.com/ee/dtr/ for more details).

Docker repository is a collection of different docker images with same name, that have different tags. Tag is alphanumeric identifier of the image within a repository.

For example see https://hub.docker.com/r/library/python/tags/. There are many different tags for the official python image, these tags are all members of the official python repository on the Docker Hub. Docker Hub is a Docker Registry hosted by Docker.

To find out more read:

  • https://docs.docker.com/registry/
  • https://github.com/docker/distribution

From the book Using Docker, Developing and deploying Software with Containers

Registries, Repositories, Images, and Tags

There is a hierarchical system for storing images. The following terminology is used:

Registry

A service responsible for hosting and distributing images. The default registry is the Docker Hub.

Repository

A collection of related images (usually providing different versions of the same application or service).

Tag

An alphanumeric identifier attached to images within a repository (e.g., 14.04 or stable ).

So the command docker pull amouat/revealjs:latest will download the image tagged latest within the amouat/revealjs repository from the Docker Hub registry.


Complementing the information:

  • You usually push a repository to a registry (and all images that are part of it). But you can push a single image to a registry. In all cases, you use docker push.
  • An image has a 12-hex-digit Image ID, but is also identified by: namespace/repo-name:tag
  • The image full name can be optionally prefixed by the registry host name and port: myregistryhost:5000/namespace/repo-name:tag
  • A common naming convention is to use your registry user-name as what I called "namespace".

A docker repository is a cute combination of registry and image.

docker tag foo <registry>/<image>:<tag>

is the same as

docker tag foo <repository>:<tag>