• 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_msvc.ps1 C:\
16RUN C:\mesa_deps_msvc.ps1
17
18COPY mesa_deps_choco.ps1 C:\
19RUN C:\mesa_deps_choco.ps1
20
21# Example usage:
22# `base_image` should use windows image that can be run with `--isolation=process` option,
23# since the resulting container will want to be used that way be later containers in the build process.
24# Only --isolation=hyperv can succeed building this container locally,
25#   --isolation=process have network issue when installing Visual Studio and choco will crash
26# docker build --isolation=hyperv -f .\Dockerfile_msvc -t mesa_vs --build-arg base_image="mcr.microsoft.com/windows:10.0.19041.1415" .
27
28