How to Push you custom Docker Images to Azure Container Registry?
In this post, We will be going to see that how we can tag and push our custom docker images to ACR i.e. Azure Container Registry.
Azure CLI
We are going to use Azure CLI during whole setup. So make sure you have Azure CLI installed and you are able to run "az" command. You can check your CLI version using |az --version| as below-
If you don't have installed. you can download and install it from |https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest|.
Note - I am assuming here that -
- you have already logged in with Azure CLI. If you haven't, then please do that using |az login|.
- You have already created ACR in specific Resource Group. If not, then do that using |az group create [OPTIONS]|.
Login to Azure Container Registry-
Fetch name of ACR using command |az acr list -g {group_name} -o table|.
Then, use command |az acr login --name [Registry Name]| to log in to your Azure Container Registry:
Tag your Docker Image-
One important thing here, if want to push docker image to registry then that should be tagged with registry name or here with loginServer name of registry. Actually these tags will be used for routing when we push these tagged images to registry.
So, lets find out the loginServer name for Azure Container Registry. Use below command for the same -
| az acr list -g [Group Name] --query "[].{acrLoginServer:loginServer}" -o table|
Now, we'll tag the one of the available image and then will push that to azure container registry.
List of Current Images -
Tag Image with ID |7b46b9b6f72a| -
List Images again-
You can see new image tagged starting with the same name as ACR registry. Now lets push this image to ACR.
Push Image to ACR
Check if Images have been uploaded successfully to ACR-
You can note down the highlighted one that we pushed before and it is there in ACR. Of course, You can verify this all from Azure Portal as well.
That\s all for now. Happy Learning :)!!
Awesome! Education is the extreme motivation that open the new doors of data and material. So we always need to study around the things and the new part of educations with that we are not mindful.
ReplyDeleteDevOps Online Training
DevOps Training in Pune
Nice blog, very interesting to read
ReplyDeleteDevOps Training | Certification in Chennai | DevOps Training | Certification in anna nagar | DevOps Training | Certification in omr | DevOps Training | Certification in porur | DevOps Training | Certification in tambaram | DevOps Training | Certification in velachery
I have bookmarked this article page as i received good information from this.
Great blog.So much useful information.
ReplyDeleteJava training in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Online Training
Azure DevOps online training
ReplyDeleteAzure online training
Chef online training
Thanks for sharing us this knowledge, it was being very useful when i looked for blog pages to read.
ReplyDeletedata science training in chennai
ccna training in chennai
iot training in chennai
cyber security training in chennai
ethical hacking training in chennai