In the previous 3 posts we build a Terraform template for deploying multiple resources to Azure and we created a build agent in a container which we can run on the fly and we fully automated the deployment through VSTS. In this small addendum, I just want to add a little side note of an alteration I made to the process of the docker build agent.
Originally I started of with the debian:stretch base image, but because I needed some additional tools when trying out service principals for the third part of the posts, I switched the base image to microsoft/vsts-agent:ubuntu-14.04. This is the base image which is also used by the standard vsts-agent which has all the tools like Java, azure cli, cmake, … The standard vsts-agent however was way too big and bloated for the job I wanted to get done (more than 8Gb). However, if you start from the same docker file and strip the things you don’t need, you still end up with a lean docker image, which will start up quite quickly.
So at the moment, this is my docker file:
It is copy pasted from this one and I kept only the bits and pieces I needed (still a bit too much btw at the moment, but you get the point).
What I also needed to do was rename some of the environment variables in my Azure function, so VSTS_TOKEN instead of VSTS_AGENT_INPUT_TOKEN. But apart from that, this agent works smoothly.
That’s it, small addendum.