Run Self-Hosted Containerised Build Agents using Azure Container Instance and Azure DevOps
3 min readApr 15, 2021
Running build agent in containers is a great solution for achieving flexibility and reducing the costs of maintaining build agents.
In this article, I will run through all the steps needed to start one.
Set up your Dockerfile
The first step is creating a folder containing a Dockerfile.
Create an Azure Container Registry
We then create an Azure Container Registry.
az group create --name buildagent --location uksouth
az acr create --resource-group buildagent --name alberto --sku Basic
Build the Dockerfile in the Cloud with a Task
We build our image using an Azure Registry Task.
az acr build --registry alberto -t buildagent:v1.0 --platform windows .