| 1 |
# 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 |
|
| 16 |
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8.1-windowsservercore-ltsc2025 |
| 17 |
|
| 18 |
# Restore the default Windows shell for correct batch processing below. |
| 19 |
SHELL ["cmd", "/S", "/C"] |
| 20 |
|
| 21 |
# Install Build Tools excluding workloads and components with known issues. |
| 22 |
ADD --checksum=sha256:93bf06959261a301aca6406d058ade08f34ae83ca458fe3ed0689aa2105d9ccc https://aka.ms/vs/17/release/vs_BuildTools.exe C:\TEMP\vs_buildtools.exe |
| 23 |
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` |
| 24 |
--installPath C:\BuildTools ` |
| 25 |
--add Microsoft.VisualStudio.Component.VC.CoreBuildTools ` |
| 26 |
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` |
| 27 |
--add Microsoft.VisualStudio.Component.Windows10SDK.19041 ` |
| 28 |
|| IF "%ERRORLEVEL%"=="3010" EXIT 0 |
| 29 |
RUN DEL C:\TEMP\vs_buildtools.exe |
| 30 |
|
| 31 |
# Install CMake |
| 32 |
ADD --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 |
| 33 |
RUN 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) |
| 38 |
ADD --checksum=sha256:bff575f21343f602c7b6c3ad3883a28053a1a50cde2153102d30479f85911738 https://boost.teeks99.com/bin/1.88.0/boost_1_88_0-msvc-14.3-64.exe C:\TEMP\boost.exe |
| 39 |
ENV BOOST_ROOT=C:\Libraries\boost_1_88_0 |
| 40 |
RUN C:\TEMP\boost.exe /DIR=%BOOST_ROOT% /SILENT && ` |
| 41 |
DEL C:\TEMP\boost.exe && ` |
| 42 |
SETX BOOST_LIBRARYDIR "%BOOST_ROOT%\lib64-msvc-14.3" && ` |
| 43 |
SETX PATH "%BOOST_LIBRARYDIR%;%PATH%" |
| 44 |
|
| 45 |
# Install chocolatey |
| 46 |
RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" ` |
| 47 |
-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command ` |
| 48 |
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" ` |
| 49 |
&& SETX PATH "%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" |
| 50 |
|
| 51 |
# Install winflexbison (for the thrift compiler build) |
| 52 |
RUN choco install winflexbison3 -y |
| 53 |
|
| 54 |
# Install 7zip and curl (used by the libevent and zlib build scripts) |
| 55 |
RUN choco install 7zip curl -y |
| 56 |
|
| 57 |
# Install libevent |
| 58 |
COPY appveyor\build-libevent.bat C:\TEMP\build-libevent.bat |
| 59 |
ENV LIBEVENT_VERSION=2.1.8 |
| 60 |
ENV WIN3P=C:\TEMP\WIN3P |
| 61 |
RUN C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && ` |
| 62 |
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% && ` |
| 67 |
RMDIR /S /Q C:\TEMP\WIN3P && ` |
| 68 |
SETX LIBEVENT_ROOT "C:\Libraries\libevent-%LIBEVENT_VERSION%" |
| 69 |
|
| 70 |
# Install zlib |
| 71 |
COPY appveyor\build-zlib.bat C:\TEMP\build-zlib.bat |
| 72 |
ENV ZLIB_VERSION=1.3.1 |
| 73 |
ENV WIN3P=C:\TEMP\WIN3P |
| 74 |
RUN C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && ` |
| 75 |
MKDIR C:\TEMP\WIN3P && ` |
| 76 |
C:\TEMP\build-zlib.bat && ` |
| 77 |
MOVE C:\TEMP\WIN3P\zlib-inst C:\Libraries\zlib-%ZLIB_VERSION% && ` |
| 78 |
RMDIR /S /Q C:\TEMP\WIN3P && ` |
| 79 |
SETX ZLIB_ROOT "C:\Libraries\zlib-%ZLIB_VERSION%" && ` |
| 80 |
SETX PATH "%ZLIB_ROOT%\bin;%PATH%" |
| 81 |
|
| 82 |
# Install OpenSSL 3.6.1 |
| 83 |
ADD --checksum=sha256:8ce11c409adbd177ca627115bc697c3b66c414bb36175ebb375341eb426894a8 https://slproweb.com/download/Win64OpenSSL-3_6_1.exe C:\TEMP\openssl.exe |
| 84 |
RUN C:\TEMP\openssl.exe /silent && ` |
| 85 |
DEL C:\TEMP\openssl.exe && ` |
| 86 |
SETX OPENSSL_ROOT "C:\OpenSSL-Win64" && ` |
| 87 |
SETX PATH "%OPENSSL_ROOT%\bin;%PATH%" |
| 88 |
|
| 89 |
# Install java |
| 90 |
RUN choco install jdk8 -y |
| 91 |
|
| 92 |
# Install python3 |
| 93 |
RUN choco install python3 -y |
| 94 |
RUN pip install setuptools |
| 95 |
|
| 96 |
# Install Adobe Flex 4.6 SDK and set FLEX_HOME so it can be found |
| 97 |
ADD --checksum=sha256:622b63f29de44600ff8d4231174a70fcb3085812c0e146a42e91877ca8b46798 http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip C:\Adobe\Flex\SDK\4.6\SDK.zip |
| 98 |
RUN 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 |
|
| 103 |
RUN choco install nodejs -y |
| 104 |
|
| 105 |
# Start developer command prompt with any other commands specified. |
| 106 |
ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && |
| 107 |
|
| 108 |
# Default to PowerShell if no other command specified. |
| 109 |
CMD powershell.exe -NoLogo -ExecutionPolicy Bypass |