Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitjano committed Apr 27, 2024
1 parent beffc8e commit 2095dec
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022
# Reset the shell.
SHELL ["cmd", "/S", "/C"]

# install powershell core
RUN powershell Invoke-WebRequest -Uri https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.msi -OutFile $env:TEMP\powershell.msi ; \
Start-Process -Wait -FilePath msiexec.exe -ArgumentList '/i', '$env:TEMP\powershell.msi', '/quiet', '/norestart' ; \
Remove-Item $env:TEMP\powershell.msi -Force
ENV PATH="${PATH};C:\Windows\System32\WindowsPowerShell\v1.0"


# download and install vs build tools needed by vcpkg
RUN powershell -Command \
Invoke-WebRequest -Uri https://aka.ms/vs/17/release/channel -OutFile $env:TEMP\VisualStudio.chman; \
Expand All @@ -14,7 +21,9 @@ RUN powershell -Command \
"--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", \
"--add", "Microsoft.Component.MSBuild", \
"--add", "Microsoft.VisualStudio.Component.Windows11SDK.22621", \
"--includeRecommended";
"--includeRecommended"; \
Remove-Item $env:TEMP\VisualStudio.chman -Force; \
Remove-Item $env:TEMP\vs_buildtools.exe -Force

# install git
RUN powershell -Command \
Expand Down

0 comments on commit 2095dec

Please sign in to comment.