@@ -4,35 +4,38 @@ ARG BASE_IMAGE=mcr.microsoft.com/windows/servercore:$WINDOWS_VERSION
44FROM $BASE_IMAGE
55
66ARG LLVM_VER=14.0.6
7- ARG RUST_VER=1.83
8- ARG 7ZIP_VERSION=2301
9- ARG GIT_VERSION=2.43.0
10-
11- # Install VC++
7+ ARG RUST_VER=1.90
8+ ARG ZIP_VERSION=2501
9+ ARG GIT_VERSION=2.51.0
1210
1311WORKDIR C:/buildtools
1412
13+ # Install VC++
1514# Download channel for fixed install.
1615ARG CHANNEL_URL=https://aka.ms/vs/17/release/channel
1716ADD ${CHANNEL_URL} C:/TEMP/VisualStudio.chman
1817
18+ # Download and install Build Tools for Visual Studio 2022 for native desktop workload.
1919ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:/TEMP/vs_buildtools.exe
20- RUN C:/TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache --installPath C:/buildtools \
21- # --all
22- --add Microsoft.Component.MSBuild \
23- --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \
24- --add Microsoft.VisualStudio.Component.Windows10SDK.20348
20+ RUN C:/TEMP/vs_buildtools.exe --quiet --wait --norestart --nocache \
21+ --channelUri C:/TEMP/VisualStudio.chman \
22+ --installChannelUri C:/TEMP/VisualStudio.chman \
23+ --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended \
24+ --installPath C:/BuildTools
25+
2526
2627SHELL ["C:\\ buildtools\\ Common7\\ Tools\\ VsDevCmd.bat" , "&&" , "powershell.exe" , "-NoLogo" , "-ExecutionPolicy" , "Bypass" ]
2728
28- RUN Invoke-WebRequest -UserAgent 'DockerCI' -outfile 7zsetup.exe https://www.7-zip.org/a/7z$env:7ZIP_VERSION -x64.exe
29+ RUN Invoke-WebRequest -UserAgent 'DockerCI' -outfile 7zsetup.exe https://www.7-zip.org/a/7z$env:ZIP_VERSION -x64.exe
2930RUN Invoke-WebRequest -UserAgent 'DockerCI' github.com/ghaith/llvm-package-windows/releases/download/v$env:LLVM_VER/LLVM-$env:LLVM_VER-win64.7z -outfile C:/TEMP/llvm.7z
3031RUN Invoke-WebRequest -UserAgent 'DockerCI' https://win.rustup.rs -outfile C:/TEMP/rustup-init.exe
3132RUN Invoke-WebRequest -UserAgent 'DockerCI' https://github.com/git-for-windows/git/releases/download/v$env:GIT_VERSION.windows.1/PortableGit-$env:GIT_VERSION-64-bit.7z.exe -outfile C:/TEMP/git-install.exe
3233
3334# Install 7zip
3435RUN ./7zsetup /S /D=C:/buildtools/7z
3536RUN setx /M PATH $($Env:PATH + ';C:/buildtools/7z/' )
37+ # Install git to use bash
38+ RUN 7z.exe x C:/TEMP/git-install.exe -ogit
3639
3740# Setup llvm sources
3841ADD https://github.com/ghaith/llvm-package-windows/releases/download/v$LLVM_VER/LLVM-$LLVM_VER-win64.7z C:/TEMP/llvm.7z
@@ -51,7 +54,6 @@ RUN cargo install mdbook grcov cargo-nextest
5154
5255RUN setx /M PATH $($Env:PATH + ';C:/buildtools/llvm/bin' )
5356
54- RUN 7z.exe x C:/TEMP/git-install.exe -ogit
5557
5658# RUN cargo install cargo-watch #Activate this for local builds to enable watching
5759WORKDIR C:/build
0 commit comments