Dockerfile 1.3 KB

123456789101112131415161718192021222324252627282930
  1. # escape=`
  2. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  3. # file Copyright.txt or https://cmake.org/licensing for details.
  4. # Produce a base image with a build environment for portable CMake binaries.
  5. # Build using the directory containing this file as its own build context.
  6. ARG FROM_IMAGE_NAME=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
  7. ARG FROM_IMAGE_DIGEST=@sha256:a94289bfd61ba89cd162f7cf84afe0e307d4d2576b44b9bd277e7b3036ccfa6b
  8. ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
  9. FROM $FROM_IMAGE
  10. # Use a traditional Windows shell.
  11. SHELL ["cmd", "/S", "/C"]
  12. # Install Visual Studio Build Tools for desktop development with C++.
  13. ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
  14. RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
  15. --installPath C:\BuildTools `
  16. --add Microsoft.VisualStudio.Workload.VCTools `
  17. --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
  18. --add Microsoft.VisualStudio.Component.VC.CLI.Support `
  19. --add Microsoft.VisualStudio.Component.VC.ATL `
  20. --add Microsoft.VisualStudio.Component.Windows10SDK.18362 `
  21. || IF "%ERRORLEVEL%"=="3010" EXIT 0
  22. RUN del C:\TEMP\vs_buildtools.exe
  23. # Add a toolchain environment loader for each architecture.
  24. COPY msvc-x86_64.bat msvc-i386.bat C:\