-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathwindows.Dockerfile
More file actions
106 lines (98 loc) · 4.42 KB
/
windows.Dockerfile
File metadata and controls
106 lines (98 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# escape=`
ARG BASE_IMAGE=mcr.microsoft.com/dotnet/framework/runtime:4.8
FROM ${BASE_IMAGE}
SHELL ["powershell"]
ENV VS_VERSION=2019
RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
Switch ($env:VS_VERSION) { `
"2019" {$url_version = "16"} `
"2022" {$url_version = "17"} `
default {echo "Unsupported VS version $env:VS_VERSION"; EXIT 1} `
}; `
wget -Uri https://aka.ms/vs/${url_version}/release/vs_buildtools.exe -OutFile vs_buildtools.exe
SHELL ["cmd", "/S", "/C"]
RUN (start /w vs_buildtools.exe --quiet --wait --norestart --nocache `
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\%VS_VERSION%\BuildTools" `
--add Microsoft.Component.MSBuild `
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools `
--add Microsoft.VisualStudio.Component.VC.Redist.14.Latest `
--add Microsoft.VisualStudio.Component.Windows10SDK `
--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core `
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
--add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre `
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) `
&& del /q vs_buildtools.exe `
&& if not exist "C:\Program Files (x86)\Microsoft Visual Studio\%VS_VERSION%\BuildTools\VC\Auxiliary\Build\vcvars64.bat" exit 1
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat", "&&"]
SHELL ["powershell"]
ENV chocolateyUseWindowsCompression false
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
SHELL ["cmd", "/S", "/C"]
RUN call "%ProgramFiles(x86)%\Microsoft Visual Studio\%VS_VERSION%\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && `
powershell -command "[Environment]::SetEnvironmentVariable('Path', $env:Path, [System.EnvironmentVariableTarget]::Machine)"
RUN choco feature disable --name showDownloadProgress && `
choco install -y --fail-on-error-output git -params '"/GitAndUnixToolsOnPath"' && `
choco install -y --fail-on-error-output 7zip && `
choco install -y --fail-on-error-output ccache && `
choco install -y --fail-on-error-output cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' && `
choco install -y --fail-on-error-output ninja
SHELL ["bash.exe", "-x", "-e", "-c"]
RUN "`
curl -OSL --ssl-no-revoke https://zlib.net/zlib131.zip && `
7z.exe x zlib131.zip && `
rm zlib131.zip && `
cd zlib-1.3.1 && `
mkdir build && `
cd build && `
cmake.exe .. -A x64 -T host=x64 -D BUILD_SHARED_LIBS=YES && `
cmake.exe --build . --target INSTALL --config Release && `
cd ../.. && `
rm -rf zlib-1.3.1"
RUN "`
curl -OSL --ssl-no-revoke https://download.sourceforge.net/libpng/lpng1647.zip && `
7z.exe x lpng1647.zip && `
rm lpng1647.zip && `
mkdir -p lpng1647/build && `
cd lpng1647/build && `
cmake .. -T host=x64 -A x64 && `
cmake --build . --target INSTALL --config Release && `
cd ../.. && `
rm -rf lpng1647"
RUN "`
curl -SL --ssl-no-revoke https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v2024.10.24.zip -o OpenCL-Headers.zip && `
7z.exe x OpenCL-Headers.zip && `
rm OpenCL-Headers.zip && `
mkdir OpenCL-Headers-2024.10.24/build && `
cd OpenCL-Headers-2024.10.24/build && `
cmake .. && `
cmake --build . --target install && `
cd ../.. && `
rm -rf OpenCL-Headers-2024.10.24"
RUN "`
curl -SL --ssl-no-revoke https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v2024.10.24.zip -o OpenCL-ICD-Loader.zip && `
7z.exe x OpenCL-ICD-Loader.zip && `
rm OpenCL-ICD-Loader.zip && `
mkdir OpenCL-ICD-Loader-2024.10.24/build && `
cd OpenCL-ICD-Loader-2024.10.24/build && `
cmake .. -T host=x64 -A x64 && `
cmake --build . --target install && `
cd ../.. && `
rm -rf OpenCL-ICD-Loader-2024.10.24"
RUN "`
curl -OSL --ssl-no-revoke https://archives.boost.io/release/1.76.0/source/boost_1_76_0.7z && `
7z.exe x boost_1_76_0.7z && `
cd boost_1_76_0 && `
MSYS_NO_PATHCONV=1 cmd /c bootstrap.bat && `
./b2.exe install -j 16 address-model=64 `
--with-chrono `
--with-log `
--with-program_options `
--with-serialization `
--with-system `
--with-date_time `
--with-timer && `
cd .. && `
rm -rf boost_1_76_0"