Docker Registry is a scalable server where we can store our Docker images. The benefit of running Docker Registry for storing images instead of using Docker Hub is that we can own the images created. Our build or deploy pipelines don't need to rely on Docker Hub. Some other prominent advantages of using a self-hosted Docker Registry are as follows:
- We can co-locate the registry with the application servers, which will reduce the time of deployment
- It helps save bandwidth
- It can help in compliance, in case we need to satisfy something that Docker Hub is missing
In this recipe, we will write a task to create a Docker Registry using a Docker container.