Registry vs Repository Terminology
What you'll learn: How registries, repositories, and image tags work together in container distribution.
When working with container images, you'll encounter three key terms that often confuse beginners. Understanding the distinction is essential for navigating container ecosystems effectively.
The Library Analogy
Think of container distribution like a library system:
- Registry = The entire library building (e.g., Docker Hub, Amazon ECR, Google Container Registry)
- Repository = A specific bookshelf for one book series (e.g.,
nginx,postgres,myapp) - Image Tag = Different editions of the same book (e.g.,
latest,v1.2,alpine)
Breaking Down the Hierarchy
A registry is the service that stores and distributes container images. It's the top-level hosting platform. Examples include Docker Hub, GitHub Container Registry, or your organization's private registry.
A repository lives inside a registry and contains all versions of a specific image. When you reference nginx, you're pointing to the nginx repository. Each repository holds multiple related images.
An image tag identifies a specific version within a repository. Tags like nginx:1.21, nginx:alpine, or nginx:latest all point to different images in the same nginx repository.
The Full Picture
When you see docker.io/library/nginx:latest, you're looking at:
docker.io= registry (Docker Hub)library/nginx= repository (official nginx images)latest= tag (most recent stable version)
For private registries, you might see myregistry.com/team/myapp:v2.0, where the registry, repository, and tag are clearly separated.
Key Takeaway: A registry hosts multiple repositories, each repository contains multiple tagged versions of one image — together they form a hierarchical addressing system for container distribution.