Posts

Showing posts from May, 2020

Self-Hosted Azure Devops Build Agent using Docker - AzureDevops 2019 and above - Docker in Docker

Problem Statement
AzureDevops (aka tfs/vsts) 2019 and latest is no longer providing a standard docker image to start build agents. Instead Microsoft is providing reference to bunch of scripts to get started. If you just need a simple build agent (even with docker), general documentation is good enough. But with bigger organizations who has requirement to run Self-Hosted agents in docker, facing several issues with that simple setup. 
Initial Reading: Microsoft Documentation - Running a self-hosted agent in Docker

Our Scenario: Self-Hosted build agentsUsing docker for pipelineNeed to utilize resources effectively (instead of setting up many VMs as build agents)Need to run some automation testing (involves docker containers) in the pipelineIssue: Standard scripts provided by Microsoft cannot handle DIND (docker in docker)docker-compose with volume mapping in dind is not working at all
Solution 
First we need to build an docker image to run build agents in docker environments.
Docker File
Followi…