win-build/Dockerfile

20 lines
897 B
Docker
Raw Normal View History

2021-02-18 18:39:35 +00:00
# escape=`
2023-03-24 22:05:42 +00:00
FROM mcr.microsoft.com/windows/servercore:ltsc2022
2021-02-18 18:39:35 +00:00
2023-03-27 17:16:49 +00:00
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
2021-02-18 18:39:35 +00:00
RUN C:\docker\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\docker\visualstudio.release.chman `
--installChannelUri C:\docker\visualstudio.release.chman `
2023-03-27 18:19:35 +00:00
--add Microsoft.VisualStudio.Workload.VCTools `
--includeRecommended `
2021-02-18 18:39:35 +00:00
--installPath C:\msvc
2023-03-27 18:19:35 +00:00
RUN setx path "%path%;C:\msvc\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
RUN setx path "%path%;C:\msvc\MSBuild\Current\Bin"
2021-02-18 18:39:35 +00:00
VOLUME C:\source\
WORKDIR C:\source\
2021-02-23 23:32:37 +00:00
ENTRYPOINT ["powershell", "-NoExit", "-Command", "Import-Module C:\\msvc\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll;", "Enter-VsDevShell -VsInstallPath C:\\msvc\\ -DevCmdArguments -arch=amd64;"]