Guest User

Untitled

a guest
Jun 28th, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. # escape=`
  2.  
  3. # Use the latest Windows Server Core 2022 image.
  4. FROM mcr.microsoft.com/windows/servercore:ltsc2022
  5.  
  6. # Restore the default Windows shell for correct batch processing.
  7. SHELL ["cmd", "/S", "/C"]
  8.  
  9. # Copy necessary files
  10. COPY "test.cs" "test.cs"
  11. COPY "x20_client" C:\x20_client
  12.  
  13. # Install Visual Studio Build Tools 2022 and .NET Framework Developer Packs
  14. RUN `
  15. curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe `
  16. && (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
  17. --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" `
  18. --add Microsoft.VisualStudio.Workload.AzureBuildTools `
  19. --add Microsoft.Net.Component.4.5.2.TargetingPack `
  20. --add Microsoft.Net.Component.4.6.2.TargetingPack `
  21. --add Microsoft.Net.Component.4.7.2.TargetingPack `
  22. --add Microsoft.Net.Component.4.8.TargetingPack `
  23. --add Microsoft.Net.ComponentGroup.TargetingPacks.Common `
  24. --add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64 `
  25. --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
  26. --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
  27. --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
  28. --remove Microsoft.VisualStudio.Component.Windows81SDK `
  29. || IF "%ERRORLEVEL%"=="3010" EXIT 0) `
  30. && del /q vs_buildtools.exe
  31.  
  32. # Define the entry point for the Docker container
  33. ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
  34.  
Advertisement
Add Comment
Please, Sign In to add comment