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