A repository containing the definition for various Docker images.
The images produced by the dockerfiles available here contain a full installation of Visual Studio, and thus require around 40G of disk space. To increase that limit, the docker configuration can be updated as outlined here
To build an image, simply run the following command in the Azure Build Agents directory:
# Visual Studio 2017
Build-VSImage.ps1 -MajorVersion 15
# Visual Studio 2019
Build-VSImage.ps1 -MajorVersion 16
# Visual Studio 2022
Build-VSImage.ps1 -MajorVersion 17
This script will build the image for the corresponding version of Visual Studio, log all the output in a Docker-{guid}.log file, tag the image with the corresponding version of VS (only Major.Minor.Patch
; ie. vs16.3.5
) and generate a Markdown file summarizing what has been installed on the image.
Additional options are available in this script:
PushImage
: indicates whether to attempt to push the image; must be used withDockerTagPrefix
DockerTagPrefix
: a prefix to apply to the image docker tag; must be used withPushImage
This image can be run using a simple docker run
command.
docker run -m 4G -dt vs17.1.1
It is also compatible with Azure Pipelines container jobs. Given the size of the resulting image (between 40 and 50G), it is not advised to use with Azure Pipelines agents as the pull of the image takes around 1 hour, which will cause a timeout. To use it, configure a self-hosted agent and execute the pull command pre-emptively.