win-build/Dockerfile

20 lines
897 B
Docker

# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2022
ADD https://aka.ms/vs/17/release/channel C:\docker\visualstudio.release.chman
ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:\docker\vs_buildtools.exe
RUN C:\docker\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\docker\visualstudio.release.chman `
--installChannelUri C:\docker\visualstudio.release.chman `
--add Microsoft.VisualStudio.Workload.VCTools `
--includeRecommended `
--installPath C:\msvc
RUN setx path "%path%;C:\msvc\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
RUN setx path "%path%;C:\msvc\MSBuild\Current\Bin"
VOLUME C:\source\
WORKDIR C:\source\
ENTRYPOINT ["powershell", "-NoExit", "-Command", "Import-Module C:\\msvc\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll;", "Enter-VsDevShell -VsInstallPath C:\\msvc\\ -DevCmdArguments -arch=amd64;"]