Skip to content

Instantly share code, notes, and snippets.

@kek-Sec
Created February 16, 2023 11:51
Show Gist options
  • Save kek-Sec/82610e372d6b06061f6024dc38dd12ab to your computer and use it in GitHub Desktop.
Save kek-Sec/82610e372d6b06061f6024dc38dd12ab to your computer and use it in GitHub Desktop.
azure-devops-docker-agent-poc
# escape=`
FROM mcr.microsoft.com/windows/servercore:20H2
# Download channel for fixed install.
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel
ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman
# Download and install Build Tools for Visual Studio.
ADD https://aka.ms/vs/16/release/vs_BuildTools.exe C:\TEMP\vs_buildtools.exe
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\TEMP\VisualStudio.chman `
--installChannelUri C:\TEMP\VisualStudio.chman `
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
--add Microsoft.VisualStudio.Workload.MSBuildTools `
--add Microsoft.VisualStudio.Workload.NetCrossPlat `
--add Microsoft.VisualStudio.Workload.XamarinBuildTools`
--add Component.Xamarin.Profiler`
--add Microsoft.VisualStudio.Workload.Node`
--add Microsoft.VisualStudio.Workload.NetCoreBuildTools
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Install node.js & set Environment PATH.
RUN msiexec.exe /i https://nodejs.org/dist/v16.14.0/node-v16.14.0-x64.msi /qn
# Start agent
WORKDIR /azp
COPY start.ps1 .
CMD powershell .\start.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment