1

I have to use Azure DevOps agent on the VM because that VM is located in special network (so can't use AKS, etc)

VM has Docker installed and pipeline has job with container specified

How can I execute multiple Docker containers on the same VM (agent) to run jobs in parallel

Arpit Jain
  • 1,217
  • 8
  • 27
kagarlickij
  • 7,327
  • 10
  • 36
  • 71
  • 1
    You can try to run agent in docker container.Please refer to this [document](https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops) – Hugh Lin Jan 20 '20 at 10:13

1 Answers1

0

The easiest way that I've found is to execute the following bash script on system startup (add @reboot /root/ados-agents-start.sh via crontab -e):


for run in {1..3}
do
  docker run -d -e VSTS_ACCOUNT='kagarlickij' -e VSTS_POOL='Self-Hosted' -e VSTS_TOKEN='a***q' mcr.microsoft.com/azure-pipelines/vsts-agent:ubuntu-16.04-docker-18.06.1-ce > /dev/null 2>&1
done
kagarlickij
  • 7,327
  • 10
  • 36
  • 71