Hi All, this document deals with how to install private Docker registry in ubuntu 16.04.
Docker registry is the place where you can create a repository and store all the images for your docker container.
If you consider the security issue, then it is always better to keep your container images in a private registry.
Learn more about docker registry and repository from here.
Docker installed in your System, if not check this link to perform this.
Step 1: Create DNS record for your Docker registry instance, here had created local DNS as dockerreg
Step 2: Pull the docker registry image from docker hub.
Step 3: Run the docker registry image.
Step 4: Now you have done with the setup docker registry. Now, let’s look in how to how to push and pull the docker images to the newly created private registry.
Step 5: Here I have my own docker image called “prabhin/new: latest”. Now, let’s push this image to provide registry.
Step 6: First change the image tag to the private registry.
Now my existing prabhin/new: latest image tag is changed to dockerreg:5000/prabhin: latest
Step 7: Now push the docker image to our private registry.
Step 8: Now the image has pushed to the private registry.
Step 9: Open browser and http://dockerreg:5000/v2/catalog
This is your docker registry and you can see your repository has created.
Step 10: Now you can pull these image in any other host.
if the terminal throws any HTTP to https client error, create the following with following contents
Now you will be able to pull docker images from the private registry.
Happy Learning 🙂
© 2019, Techrunnr. All rights reserved.