• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# escape=`
2
3ARG base_image
4FROM ${base_image}
5
6# https://www.thomasmaurer.ch/2019/07/how-to-install-and-update-powershell-7/
7# Wrapping the following command in cmd.exe
8# iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"
9RUN powershell -ExecutionPolicy RemoteSigned -Command "$ErrorActionPreference = 'Stop'; iex ""& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet"""
10
11# Make sure any failure in PowerShell scripts is fatal
12SHELL ["pwsh", "-ExecutionPolicy", "RemoteSigned", "-Command", "$ErrorActionPreference = 'Stop';"]
13RUN Write-Output $PSVersionTable $ErrorActionPreference
14
15COPY mesa_deps_vs2019.ps1 C:\
16RUN C:\mesa_deps_vs2019.ps1
17COPY mesa_vs_init.ps1 C:\
18
19ENV VULKAN_SDK_VERSION='1.3.211.0'
20COPY mesa_deps_choco.ps1 C:\
21RUN C:\mesa_deps_choco.ps1
22
23# Example usage:
24# `base_image` should use windows image that can be run with `--isolation=process` option,
25# since the resulting container will want to be used that way be later containers in the build process.
26# Only --isolation=hyperv can succeed building this container locally,
27#   --isolation=process have network issue when installing Visual Studio and choco will crash
28# docker build --isolation=hyperv -f .\Dockerfile_vs -t mesa_vs --build-arg base_image="mcr.microsoft.com/windows:10.0.19041.1415" .
29
30