Dockerfile.windows 1.1 KB

1234567891011121314151617181920212223242526
  1. # escape=`
  2. # Use the latest Windows Server Core image with .NET Framework 4.8.
  3. FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
  4. # Restore the default Windows shell for correct batch processing.
  5. SHELL ["cmd", "/S", "/C"]
  6. # Download the Build Tools bootstrapper.
  7. ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
  8. # Install Build Tools excluding workloads and components with known issues.
  9. RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
  10. --installPath C:\BuildTools `
  11. --all `
  12. --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
  13. --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
  14. --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
  15. --remove Microsoft.VisualStudio.Component.Windows81SDK `
  16. || IF "%ERRORLEVEL%"=="3010" EXIT 0
  17. # Start developer command prompt with any other commands specified.
  18. ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&
  19. # Default to PowerShell if no other command specified.
  20. CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]