Container registries: public vs private
image distribution and governance.
a registry stores and serves versioned image layers by digest; public registries are open and rate-limited, private ones add access control, scanning, signing and network isolation.
WHAT THIS TESTS Whether you understand the registry's role in the image lifecycle and the operational and security reasons teams run private registries.
A GOOD ANSWER COVERS A container registry is a server that stores and serves container images, which are sets of content-addressed layers plus a manifest, organized into repositories and referenced by tag or immutable digest. Clients push built images to it and nodes pull them to run. Public registries such as Docker Hub are openly readable, convenient for popular base and official images, but they impose pull rate limits, expose you to typosquatting and unvetted images, and put a third party in your critical path. Private registries such as AWS ECR or self-hosted Harbor add authentication and authorization so only permitted identities push or pull, integrated vulnerability scanning, image signing and policy enforcement, replication across regions for availability and pull-through caching of upstream images, plus the ability to live inside your network for compliance and lower latency. The format and protocol are the same OCI standard; the differences are access, trust, performance and control.
COMMON WRONG ANSWERS Confusing a registry with a single repository; a registry hosts many repositories. Conflating the registry with the build tool or CI; building and storing are separate steps. Believing public images are inherently safe, ignoring rate limits and supply-chain exposure. Thinking a private registry changes the image format rather than adding governance.
LIKELY FOLLOW-UPS Why pin by digest rather than a mutable tag? How do pull-through cache and replication improve reliability? How do scanning and signing fit a supply-chain security story? How do you authenticate nodes to a private registry, for example via imagePullSecrets or IAM?
ONE CONCRETE EXAMPLE A team pulls the official postgres base from Docker Hub but hits anonymous pull rate limits during a deploy. They stand up Harbor as a pull-through cache and private registry, scan and sign every internal image, restrict pushes to CI's identity, and replicate to a second region. Deploys now pull from inside the network with no external rate limit and a verified provenance chain.
Read the original → docs.docker.com
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.