How to push and pull private docker images on Docker Hub | What is Docker registry #dockerhub

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back to my channel in last videos we have learned about docker how to build docker images and deploy them now the image we have built in the last video was in your local system in the docker benefits we have seen that it is easy to transfer docker images to other systems which can be your teammate's computer a server or any docker installed system the question is how to do that so docker hub provides public and private repository to store docker images when we try to pull any open source base image from docker hub those are mostly public so you can download them without any authentication method for an example when you serve hop.docker.com you can see that there are 5 million available images which are public on the docker hub for an example ubuntu image radius image node.js mysql alpine mongodb and what not so these images you can download without any authentication now for an example in our previous video we have taken base image of the nodejs we appended our code we installed our dependency and build a new image which contained our coding files now you don't want to share it as a public you want to put some authentication so not anyone can download that file for that we can use private registry there are many docker registries available for an example docker has provided docker hub aws has its own aws elastic container registry azure google and gitlab also have provided their own container registry nevertheless you can use any container registry with any provider you can use cross platform if you want there are many more container registry also available in the market this video is in two parts in first part we are going to see how to authenticate in docker hub using private registry and in the next video we are going to see how to login and authenticate in aws ecr as docker hub and ews ecr both uses different authentication method we are going to see both before getting started all you need to do is go to the hub.docker.com and click on sign up by there you can create your docker hub account after logging in it will show you three pricing models where you can choose the free one which comes with one private repository i have already created my account and created one private repository under that as you can see identical cloud is my account name slash node.js is the image name when i click on that image you can see that there is one tag available with version 1. now here it has printed some docker commands to push the image we definitely use this command now to pull the image here is one of the my system by printing docker images there are no docker images available right now and let's pull this image as you can see it shows us the error either repository is not available or it requires docker login as this is private image now let's run docker logging command it prompts us to enter username and password enter username and password that you have created in the last step as you can see it says login succeeded now let's again try to pull the image as you can see docker image has been successfully pulled but wait you want to see how i pushed this docker image from my local system to the docker hub let's see commands for the same two main commands first is we need to tag our local image with the remote repository name and tag and then we need to fire docker push command for an example as you can see right now we have only one docker image available which we have just pulled let me build one new image over here to avoid confusion i am naming it as ic dash nodejs colon2 for version 2. we have built this image and it is only available in our local system for now let's take this image command is docker tag local image name colon remove repository name which is identical cloud slash node.js as this is going to be a revised version i'll type version 2. the image is successfully checked but it is not available in the docker hub yet we need to push this image let's run docker push on the newly tagged image it is completed when we refresh this page we can now see two versions over here tag 1 and tag 2. tag 2 is our newly created image now how to share it with your colleagues for that here you can see the option for collaborators all you need to do is i enter the username so that they can view your docker image pull it and push it when required in the free plan it is not allowed but in other plans you can add collaborators if you like this video please like comment and share for more such updates please subscribe to our channel or visit our website identicalcloud.com thank you for watching
Info
Channel: Identical Cloud
Views: 15,084
Rating: undefined out of 5
Keywords: docker, docker hub, docker registry
Id: iG3PBdRVy6I
Channel Id: undefined
Length: 7min 14sec (434 seconds)
Published: Sat Feb 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.