blob: 01ee11f04f57dd5ff77d8f2991d1796e24b503f6 [file] [log] [blame]
James E. King III278528c2019-01-11 12:17:44 -05001# escape=`
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
Shaoyu Zhang3adaf0d2026-02-20 13:28:16 -080016FROM mcr.microsoft.com/dotnet/framework/sdk:4.8.1-windowsservercore-ltsc2025
James E. King III278528c2019-01-11 12:17:44 -050017
18# Restore the default Windows shell for correct batch processing below.
19SHELL ["cmd", "/S", "/C"]
20
21# Install Build Tools excluding workloads and components with known issues.
Shaoyu Zhang3adaf0d2026-02-20 13:28:16 -080022ADD --checksum=sha256:93bf06959261a301aca6406d058ade08f34ae83ca458fe3ed0689aa2105d9ccc https://aka.ms/vs/17/release/vs_BuildTools.exe C:\TEMP\vs_buildtools.exe
James E. King III278528c2019-01-11 12:17:44 -050023RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
24 --installPath C:\BuildTools `
Shaoyu Zhang3adaf0d2026-02-20 13:28:16 -080025 --add Microsoft.VisualStudio.Component.VC.CoreBuildTools `
26 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080027 --add Microsoft.VisualStudio.Component.Windows10SDK.19041 `
James E. King III278528c2019-01-11 12:17:44 -050028 || IF "%ERRORLEVEL%"=="3010" EXIT 0
29RUN DEL C:\TEMP\vs_buildtools.exe
30
31# Install CMake
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080032ADD --checksum=sha256:a10fc2527ec0727a5913acd310cddafba1e5b4ca765ca23cc6a53c55eebb7c1 https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-windows-x86_64.msi C:\TEMP\cmake.msi
James E. King III278528c2019-01-11 12:17:44 -050033RUN msiexec.exe /i C:\TEMP\cmake.msi /qn && `
34 SETX PATH "%PATH%;C:\Program Files\CMake\bin" && `
35 DEL C:\TEMP\cmake.msi
36
37# Install boost (for the thrift runtime library build)
Shaoyu Zhang3adaf0d2026-02-20 13:28:16 -080038ADD --checksum=sha256:bff575f21343f602c7b6c3ad3883a28053a1a50cde2153102d30479f85911738 https://boost.teeks99.com/bin/1.88.0/boost_1_88_0-msvc-14.3-64.exe C:\TEMP\boost.exe
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080039ENV BOOST_ROOT=C:\Libraries\boost_1_88_0
40RUN C:\TEMP\boost.exe /DIR=%BOOST_ROOT% /SILENT && `
41 DEL C:\TEMP\boost.exe && `
Shaoyu Zhang3adaf0d2026-02-20 13:28:16 -080042 SETX BOOST_LIBRARYDIR "%BOOST_ROOT%\lib64-msvc-14.3" && `
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080043 SETX PATH "%BOOST_LIBRARYDIR%;%PATH%"
James E. King III278528c2019-01-11 12:17:44 -050044
45# Install chocolatey
46RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" `
47 -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command `
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080048 "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" `
James E. King III278528c2019-01-11 12:17:44 -050049 && SETX PATH "%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
50
51# Install winflexbison (for the thrift compiler build)
52RUN choco install winflexbison3 -y
53
54# Install 7zip and curl (used by the libevent and zlib build scripts)
55RUN choco install 7zip curl -y
56
57# Install libevent
58COPY appveyor\build-libevent.bat C:\TEMP\build-libevent.bat
59ENV LIBEVENT_VERSION=2.1.8
60ENV WIN3P=C:\TEMP\WIN3P
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080061RUN C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && `
James E. King III278528c2019-01-11 12:17:44 -050062 MKDIR C:\TEMP\WIN3P && `
63 C:\TEMP\build-libevent.bat && `
64 MKDIR C:\Libraries\libevent-%LIBEVENT_VERSION% && `
65 MOVE C:\TEMP\WIN3P\libevent-%LIBEVENT_VERSION%-stable\include C:\Libraries\libevent-%LIBEVENT_VERSION% && `
66 MOVE C:\TEMP\WIN3P\libevent-%LIBEVENT_VERSION%-stable\lib C:\Libraries\libevent-%LIBEVENT_VERSION% && `
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080067 RMDIR /S /Q C:\TEMP\WIN3P && `
68 SETX LIBEVENT_ROOT "C:\Libraries\libevent-%LIBEVENT_VERSION%"
James E. King III278528c2019-01-11 12:17:44 -050069
70# Install zlib
71COPY appveyor\build-zlib.bat C:\TEMP\build-zlib.bat
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080072ENV ZLIB_VERSION=1.3.1
James E. King III278528c2019-01-11 12:17:44 -050073ENV WIN3P=C:\TEMP\WIN3P
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080074RUN C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && `
James E. King III278528c2019-01-11 12:17:44 -050075 MKDIR C:\TEMP\WIN3P && `
76 C:\TEMP\build-zlib.bat && `
77 MOVE C:\TEMP\WIN3P\zlib-inst C:\Libraries\zlib-%ZLIB_VERSION% && `
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080078 RMDIR /S /Q C:\TEMP\WIN3P && `
79 SETX ZLIB_ROOT "C:\Libraries\zlib-%ZLIB_VERSION%" && `
80 SETX PATH "%ZLIB_ROOT%\bin;%PATH%"
James E. King III278528c2019-01-11 12:17:44 -050081
Shaoyu Zhang3adaf0d2026-02-20 13:28:16 -080082# Install OpenSSL 3.6.1
83ADD --checksum=sha256:8ce11c409adbd177ca627115bc697c3b66c414bb36175ebb375341eb426894a8 https://slproweb.com/download/Win64OpenSSL-3_6_1.exe C:\TEMP\openssl.exe
James E. King III278528c2019-01-11 12:17:44 -050084RUN C:\TEMP\openssl.exe /silent && `
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080085 DEL C:\TEMP\openssl.exe && `
86 SETX OPENSSL_ROOT "C:\OpenSSL-Win64" && `
87 SETX PATH "%OPENSSL_ROOT%\bin;%PATH%"
James E. King III278528c2019-01-11 12:17:44 -050088
89# Install java
90RUN choco install jdk8 -y
91
James E. King III278528c2019-01-11 12:17:44 -050092# Install python3
93RUN choco install python3 -y
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080094RUN pip install setuptools
James E. King III278528c2019-01-11 12:17:44 -050095
James E. King III6c26e092019-02-07 12:48:27 -050096# Install Adobe Flex 4.6 SDK and set FLEX_HOME so it can be found
Shaoyu Zhang230d0a92025-11-12 00:08:50 -080097ADD --checksum=sha256:622b63f29de44600ff8d4231174a70fcb3085812c0e146a42e91877ca8b46798 http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip C:\Adobe\Flex\SDK\4.6\SDK.zip
James E. King III6c26e092019-02-07 12:48:27 -050098RUN CD C:\Adobe\Flex\SDK\4.6 && `
99 7z x SDK.zip && `
100 DEL SDK.zip && `
101 SETX FLEX_HOME "C:\Adobe\Flex\SDK\4.6"
102
Shaoyu Zhang230d0a92025-11-12 00:08:50 -0800103RUN choco install nodejs -y
104
James E. King III278528c2019-01-11 12:17:44 -0500105# Start developer command prompt with any other commands specified.
Shaoyu Zhang230d0a92025-11-12 00:08:50 -0800106ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 &&
James E. King III278528c2019-01-11 12:17:44 -0500107
108# Default to PowerShell if no other command specified.
Shaoyu Zhang230d0a92025-11-12 00:08:50 -0800109CMD powershell.exe -NoLogo -ExecutionPolicy Bypass