Skip to content

Commit

Permalink
Use MSVS pinned version for installs in Docker (#2101)
Browse files Browse the repository at this point in the history
b/316212112

Change-Id: I03c0ee23c8922d6a668a0f34f3ec7d3b317f5e8d
  • Loading branch information
arjungm authored Dec 15, 2023
1 parent f615309 commit 4b57183
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/windows/base/visualstudio2022/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ FROM ${FROM_IMAGE}
SHELL ["powershell", "-ExecutionPolicy", "Unrestricted", "-Command", `
"$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Corresponds to VS version 17.4.6 which ships Clang 15.05
ARG MSVS_INSTALLER_URL="https://download.visualstudio.microsoft.com/download/pr/d1ed8638-9e88-461e-92b7-4e29cc6172c3/38b09fc09ae9e590b73ae6752a0ebfd62579798969041bd341689273b842bc10/vs_BuildTools.exe"
RUN mkdir C:\TEMP;`
Write-Host ('Downloading vs_buildtools.exe');`
Invoke-WebRequest -Uri https://aka.ms/vs/17/release/vs_buildtools.exe `
Invoke-WebRequest -Uri ${env:MSVS_INSTALLER_URL} `
-OutFile C:\TEMP\vs_buildtools.exe

RUN Write-Host ('Installing vs_buildtools.exe');`
Expand All @@ -39,7 +41,6 @@ RUN Write-Host ('Installing vs_buildtools.exe');`
Remove-Item -Force -Recurse ${env:ProgramFiles(x86)}\'Microsoft Visual Studio'\Installer;`
Remove-Item -Force -Recurse $env:TEMP\*;`
Remove-Item -Force -Recurse $env:ProgramData\'Package Cache'\;`
Remove-Item -Force -Recurse C:\BuildTools\VC\Tools\Llvm\ARM64;`
Remove-Item -Force -Recurse C:\BuildTools\Common7\IDE;`
Remove-Item C:\TEMP\vs_buildtools.exe

Expand Down

0 comments on commit 4b57183

Please sign in to comment.