Difference between Docker registry and repository
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".
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.