95c4563315198320832bd9b5b997a7e497f39d16
[platform/upstream/mesa.git] / .gitlab-ci / windows / Dockerfile_vs
1 # escape=`
2
3 ARG base_image
4 FROM ${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"
9 RUN 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
12 SHELL ["pwsh", "-ExecutionPolicy", "RemoteSigned", "-Command", "$ErrorActionPreference = 'Stop';"]
13 RUN Write-Output $PSVersionTable $ErrorActionPreference
14
15 COPY mesa_deps_vs2019.ps1 C:\
16 RUN C:\mesa_deps_vs2019.ps1
17 COPY mesa_vs_init.ps1 C:\
18
19 ENV VULKAN_SDK_VERSION='1.3.211.0'
20 COPY mesa_deps_choco.ps1 C:\
21 RUN 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