new docker container build test
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 3m17s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 3m17s
This commit is contained in:
@@ -1,36 +1,32 @@
|
|||||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
# escape=`
|
||||||
|
|
||||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
|
# Use a Windows Server Core 2025 image that matches our build host.
|
||||||
|
# If the version doesn't match the build host we cannot run
|
||||||
|
# this container. I'm not sure with what specificity it has to
|
||||||
|
# match, so let's pin this and then upgrade it as we upgrade
|
||||||
|
# the host.
|
||||||
|
FROM mcr.microsoft.com/windows/servercore:10.0.26100.7171
|
||||||
|
|
||||||
RUN New-Item -ItemType Directory -Path 'C:\TEMP' -Force | Out-Null
|
# Restore the default Windows shell for correct batch processing.
|
||||||
|
SHELL ["cmd", "/S", "/C"]
|
||||||
|
|
||||||
# Download and install Visual Studio Build Tools 2022 with C++ and CMake
|
RUN `
|
||||||
RUN Invoke-WebRequest -UseBasicParsing "https://aka.ms/vs/17/release/vs_buildtools.exe" -OutFile "C:\\TEMP\\vs_buildtools.exe" ; \
|
# Download the Build Tools bootstrapper.
|
||||||
Start-Process "C:\\TEMP\\vs_buildtools.exe" -Wait -ArgumentList \
|
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
|
||||||
'--wait', \
|
`
|
||||||
'--norestart', \
|
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
|
||||||
'--nocache', \
|
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
|
||||||
'--add', 'Microsoft.VisualStudio.Workload.VCTools', \
|
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
|
||||||
'--add', 'Microsoft.VisualStudio.Component.VC.CMake.Project', \
|
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
|
||||||
'--add', 'Microsoft.VisualStudio.Component.Windows10SDK.19041', \
|
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
|
||||||
'--includeRecommended', \
|
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
|
||||||
'--installPath', 'C:\\BuildTools'
|
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
|
||||||
|
--remove Microsoft.VisualStudio.Component.Windows81SDK `
|
||||||
# Install Rust using the installer
|
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
|
||||||
RUN Invoke-WebRequest -Uri "https://win.rustup.rs" -OutFile "rustup-init.exe" ; \
|
`
|
||||||
Start-Process "rustup-init.exe" -Wait -ArgumentList '-y'; \
|
# Cleanup
|
||||||
Remove-Item "rustup-init.exe"
|
&& del /q vs_buildtools.exe
|
||||||
|
|
||||||
# Add Rust to PATH
|
|
||||||
RUN setx PATH "$Env:USERPROFILE\\.cargo\\bin;$Env:PATH"
|
|
||||||
|
|
||||||
RUN $cmakeMsi = 'C:\\TEMP\\cmake-3.21.10-windows-x86_64.msi'; \
|
|
||||||
Invoke-WebRequest -UseBasicParsing ` \
|
|
||||||
-Uri "https://github.com/Kitware/CMake/releases/download/v3.21.10/cmake-3.21.10-windows-x86_64.msi" ` \
|
|
||||||
-OutFile $cmakeMsi; \
|
|
||||||
Start-Process msiexec.exe -Wait -ArgumentList "/i `"$cmakeMsi`" ADD_CMAKE_TO_PATH=System /qn"; \
|
|
||||||
Remove-Item $cmakeMsi
|
|
||||||
|
|
||||||
# Setup environment
|
|
||||||
CMD ["cmd.exe"]
|
|
||||||
|
|
||||||
|
# Define the entry point for the docker container.
|
||||||
|
# This entry point starts the developer command prompt and launches the PowerShell shell.
|
||||||
|
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
|
||||||
|
|||||||
Reference in New Issue
Block a user