Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # escape=`
- # Use the latest Windows Server Core 2022 image.
- FROM mcr.microsoft.com/windows/servercore:ltsc2022
- # Restore the default Windows shell for correct batch processing.
- SHELL ["cmd", "/S", "/C"]
- # Copy necessary files
- COPY "test.cs" "test.cs"
- COPY "x20_client" C:\x20_client
- # Install Visual Studio Build Tools 2022 and .NET Framework Developer Packs
- RUN `
- curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
- && (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
- --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
- --add Microsoft.VisualStudio.Workload.AzureBuildTools `
- --add Microsoft.Net.Component.4.5.2.TargetingPack `
- --add Microsoft.Net.Component.4.6.2.TargetingPack `
- --add Microsoft.Net.Component.4.7.2.TargetingPack `
- --add Microsoft.Net.Component.4.8.TargetingPack `
- --add Microsoft.Net.ComponentGroup.TargetingPacks.Common `
- --add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64 `
- --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
- --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
- --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
- --remove Microsoft.VisualStudio.Component.Windows81SDK `
- || IF "%ERRORLEVEL%"=="3010" EXIT 0) `
- && del /q vs_buildtools.exe
- # Define the entry point for the Docker container
- ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
Advertisement
Add Comment
Please, Sign In to add comment