Create Azure Container Registry in Azure | Create Docker image & push into Azure Container Registry

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys in this video we are going to learn what is azure container registry and we will also learn how to create a docker image and then upload the docker image into azure container registry so what is azure container registry in short form it is called acr so acr is nothing but a fully managed private docker rigid service provided by azure cloud so you can create a docker image and then upload the docker image into acr right so if you actually take a docker hub which is more like a public docker registry service right but this one is a fully managed private docker registry service okay so what are we going to do we are going to create a container registry in acr okay this is where we are going to upload the docker image and we are going to create a docker image from one of the vms right so which is hosted in azure cloud and i already have a sample python based code which is completely dockerized in bitbucket and this is the project you know we are going to check out and then build the docker image and upload the docker image into acr okay awesome so let's get started guys this is my website coachdevops.com i will be posting the link right below the video as well okay so if you look at the pre request yes i do have a vm already set up so this is the vm this already has docker installed right so this vm is actually hosted in azure cloud okay i have already installed occur so everything is good and then what we are going to do first we are going to login into azure cloud and we are going to set up a container registry right so let's login into azure portal this is my azure console or azure cloud what we are going to do here is we are going to first create a container registry so how to create that so click on create a resource and then type container registry so yeah so choose this option and then it is going to ask you do you want to create this right and like i mentioned you see here so azure container registry is nothing but as a fully managed private registry for hosting our docker images right so let's go ahead and then click on create okay so i am under pc go a subscription i know some of you may be under free tire but you can choose whichever the subscription you are you know belonging and let's select the resource group okay or if you want you can create a new new resource group but let me go ahead and then choose this resource group demo resource group okay and we need to provide a registry name so i'm going to say my azure um you know cr okay so this is already there so let's do this i'm going to say cro3 okay so that's the registry name and this is available okay and this is the location where i am close by so i'm going to leave it like that and then this is nothing but the size okay so i'm going to go ahead and select the basic one okay this is good enough for the demo purpose let's click on review and create and the validations are passed so let's go ahead and say create okay so right now it is in the process of setting up fantastic see here our container registry is been created so let's go to go to resource okay you see here so this is where so this is the login server right okay and if you want to see here you can go here um right so you know this is where you know we are going to create a login credential and everything okay so i will come back to this okay awesome so our first step is done right so basically we were able to create a container registry in azure cloud okay awesome and what is the next step so like i said i do have a sample python based application right so what we are going to do is we are going to download that okay so let me go ahead and then say clone wow so i was able to clone and this is the repo so let me go inside the repo okay and if you do see here oh i need to go inside this folder yeah if you see here so this is our source code and all right so this is just a sample python base code i have a docker file okay so if you want to quickly take a look at the docker file see here so these are the steps uh you know which has uh you know the base image information and then this is how i'm going to install python right and then copy the source code right and then i'm going to expose on port number 5000 right and then this is the step to run the application right so pretty much the whole darker you know steps right to build the docker image okay all right so why don't we go ahead and then build the docker image right so this is the command so let's build the docker image okay so the image has been built perhaps here so this is the image we were able to build right fantastic so what is our goal our goal is like i mentioned earlier we want to build a docker image and then upload the docker image into acr right so how to do that so what we need to do is we need to first make sure we are able to login into acr right so how to do that so what we need to do is uh go to your acr and then click on this admin user right so right now it was you know disabled so let's enable that and then you see here this is the username and this is the password right you can use any one of the password so let's first make sure that if you are able to log in into uh azure container registry right so let's go here go to here and then type docker login and then this is our login server right so copy here okay so what is a username so this is a username and let's use one of the password okay wow so we were successfully able to login into acr right so fantastic and we also build our docker images too right so what do we need to do is we just need to tag it right we just need to tag it so that we should be able to upload the docker image into acr right so how to do that it's a very simple command and it is already provided here right all we have to do is go ahead and then type sudo docker tag and then mention the you know image name which is that and then finally you want to mention your acr information right so which is nothing but this one isn't it so just go ahead and then mention that and then you need to say slash uh you want to say this name right mention the image name okay or however you want to tag it okay so that's it right let me explore that ah fantastic so if i want to make sure it has been tagged successfully works here so this is what we actually see right so everything is good so far and then we should be able to push the docker image right into acr so what is the command again the same command right so we're going to say docker and then say docker push and then we are going to mention our image name right which we just tied okay awesome see here we were able to successfully uh push the docker image into acr so how do you verify that let's come here you need to go to repositories under services wow so this is the image right and as you can see here 529 cst so that's the time right now right so that's it guys you know that's how you know you can create a docker image and then upload the docker image into acr thank you for watching
Info
Channel: DevOps Coach
Views: 33,696
Rating: undefined out of 5
Keywords:
Id: New8K6R0hz8
Channel Id: undefined
Length: 9min 41sec (581 seconds)
Published: Fri Mar 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.