What is Docker Registry?
Docker Registry
or Registry
is an open source and highly scalable server-side application that can be used to store and distribute Docker images.
The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license.
In short, a registry is a storage and content delivery system.
Why we use it?
You should use the Registry if you want to:
- Tightly control where your images are being stored
- Fully own your images distribution pipeline
- Integrate image storage and distribution tightly into your in-house development workflow
Hands-on Docker Registry
Start your registry
$ docker run -d -p 5000:5000 --name registry registry:2
Pull (or build) some image from the hub
$ docker pull alpine
Tag the image so that it points to your registry
$ docker image tag alpine localhost:5000/myalpine
Push it
$ docker push localhost:5000/myalpine
Pull it back
$ docker pull localhost:5000/myalpine
Now stop your registry and remove all data
$ docker container stop registry && docker container rm -v registry