How To Upload Docker Images Into Azure Container Registry Using Azure Pipelines
How To Upload Docker Images Into Azure Container Registry Using Azure Pipelines
Pipelines | Automate Docker builds using Azure Pipelines | Upload Docker Image
into Azure Container Registry (ACR)
We will learn how to build Docker image and upload the Docker images into Azure Container
Registry(ACR) using Azure Build pipelines.
Pre-requisites:
1. ACR is setup in Azure cloud. (see below for the steps)
2. Already created Azure DevOps dashboard in
https://dev.azure.com/
3. Dockerfile created along with the application source code
az login
Enter your repo name and branch name where you have stored your source code along with
Dockerfile
Click on Continue. Now choose the template by typing Docker, Select Docker container and
Apply.
Now pipeline is created with two tasks already. Now we need to customize it.
Let's modify Build an image task. Choose azure subscription and enter Microsoft credentials and
select ACR repo from the drop down
Select Push an image task and select Azure subscription and select ACR repo from the drop
down
Add a task for Copying YAML file, enter the Kubernetes deployment YAML file
Add Publish artifact task
Now click Save + Queue and run to start Building the pipeline
Once the build is completed, you should be able to see the Docker images under
Services --> Repositories