What role does a registry play in CI/CD?
A registry in CI/CD plays the role of a central artifact storage, where the build system puts Docker images and from where the deployment server takes them.
How it works stage by stage
1. CI (build)
The pipeline builds the application image (docker build) and pushes it to the registry under a specific tag, for example app:1.3.7.
2. Registry (storage) The image is stored as a version - securely, centrally, and available for different environments (dev, stage, prod).
3. CD (deployment)
The server or orchestrator (for example, Kubernetes or Docker Swarm) runs docker pull for the needed tag and deploys the container.
What this provides
- versioning - easy to roll back by choosing an old tag
- stability - the same environment everywhere
- fast delivery - deployment without rebuilding on the servers
- convenient integration - the registry becomes the single point that all stages look at
Summary: A registry is the connecting link between the build and the deployment in CI/CD. CI uploads the image there, CD downloads and deploys it, ensuring predictable and repeatable releases.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.