Dockerfile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # escape=`
  2. FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022
  3. SHELL ["cmd", "/S", "/C"]
  4. # Installation of specific Visual Studio build tools version:
  5. # - Open https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history
  6. # - Download BuildTools for a specific version.
  7. # - Open (extract) the downloaded file, for example using 7-Zip.
  8. # - Open file vs_setup_bootstrapper.json and extract the installChannelUri to VS_INSTALL_CHANNEL_URI.
  9. # 17.13.6
  10. ARG VS_INSTALL_CHANNEL_URI=https://aka.ms/vs/17/release/656692964_-684260800/channel
  11. ADD https://aka.ms/vs/17/release/vs_buildtools.exe C:/temp/vs_BuildTools.exe
  12. RUN `
  13. (start /w C:\temp\vs_BuildTools.exe `
  14. --installPath C:\VisualStudio `
  15. --channelUri %VS_INSTALL_CHANNEL_URI% `
  16. --installChannelUri %VS_INSTALL_CHANNEL_URI% `
  17. --quiet --wait --norestart --nocache --noUpdateInstaller `
  18. --locale en-US `
  19. --add Microsoft.Component.MSBuild `
  20. --add Microsoft.VisualStudio.Component.VC.ATLMFC `
  21. --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
  22. --add Microsoft.VisualStudio.Component.VC.CMake.Project `
  23. --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest `
  24. --add Microsoft.VisualStudio.Component.VC.Redist.MSM `
  25. --add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
  26. --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core `
  27. --add Microsoft.VisualStudio.Workload.NativeDesktop `
  28. --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
  29. --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
  30. --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
  31. --remove Microsoft.VisualStudio.Component.Windows81SDK `
  32. || if "%ERRORLEVEL%"=="3010" exit 0) && `
  33. `
  34. set chocolateyUseWindowsCompression='false' && `
  35. powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && `
  36. set "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" && `
  37. `
  38. choco install --no-progress --yes git --version=2.33.1 && `
  39. choco install --no-progress --yes 7zip.install --version=19.0 && `
  40. choco install --no-progress --yes innosetup --version=6.4.0 && `
  41. choco install --no-progress --yes wixtoolset --version=3.11.2 && `
  42. `
  43. refreshenv && `
  44. setx PATH "%PATH%;C:\Program Files\Git\usr\bin"
  45. ENV SEVENZIP='C:\Program Files\7-Zip'
  46. ENV INNO6_SETUP_PATH='C:\Program Files (x86)\Inno Setup 6'
  47. ENV WIX='C:\Program Files (x86)\WiX Toolset v3.11'
  48. COPY scripts\* C:\fbscripts\