Docker 101 : Docker Registry
Its role is storing docker images and their metadata ( tags, ... ).
The docker registry is also a service that opens port 5000 for incoming queries, like pushing, pulling or loading a docker image.
It can also authenticates users.
Running a registry service:
We run the registry image using the below command:
-d : for the detached mode. The container will run in the background.
--restart: when it is set to "always", the container is restarted if it crashes.
--restart: when it is set to "always", the container is restarted if it crashes.
Pushing an image to our registry:
We first tag our "debian" image:
Then we push it onto the registry on our localhost:
Saving images locally:
To save our image locally, we use the below command:
-o: tells docker to save the image "debian:12" into the "saved-images.tar.gz" file.
The saved images could also be easily moved to a different machine or to a different cluster.
Removing and restoring our image:
We can remove our image "debian:12" using the below command:
Then we could restore it using the "load" command as below:
Comments