| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 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 | |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 16 | FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 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. |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 22 | ADD --checksum=sha256:ca11782db44225d313c9887b4254dfa57c5b72fef025bf620c81c43dff73c6ed https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 23 | RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` |
| 24 | --installPath C:\BuildTools ` |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 25 | --add Microsoft.VisualStudio.Workload.VCTools ` |
| 26 | --add Microsoft.VisualStudio.Component.Windows10SDK.19041 ` |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 27 | || IF "%ERRORLEVEL%"=="3010" EXIT 0 |
| 28 | RUN DEL C:\TEMP\vs_buildtools.exe |
| 29 | |
| 30 | # Install CMake |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 31 | 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 |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 32 | RUN msiexec.exe /i C:\TEMP\cmake.msi /qn && ` |
| 33 | SETX PATH "%PATH%;C:\Program Files\CMake\bin" && ` |
| 34 | DEL C:\TEMP\cmake.msi |
| 35 | |
| 36 | # Install boost (for the thrift runtime library build) |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 37 | ADD --checksum=sha256:ae6ade62886fd9a6930c95f116a33e940224f0cb7f791b01afd7dd1ceca360fe https://boost.teeks99.com/bin/1.88.0/boost_1_88_0-msvc-14.1-64.exe C:\TEMP\boost.exe |
| 38 | ENV BOOST_ROOT=C:\Libraries\boost_1_88_0 |
| 39 | RUN C:\TEMP\boost.exe /DIR=%BOOST_ROOT% /SILENT && ` |
| 40 | DEL C:\TEMP\boost.exe && ` |
| 41 | SETX BOOST_LIBRARYDIR "%BOOST_ROOT%\lib64-msvc-14.1" && ` |
| 42 | SETX PATH "%BOOST_LIBRARYDIR%;%PATH%" |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 43 | |
| 44 | # Install chocolatey |
| 45 | RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" ` |
| 46 | -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command ` |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 47 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" ` |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 48 | && SETX PATH "%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" |
| 49 | |
| 50 | # Install winflexbison (for the thrift compiler build) |
| 51 | RUN choco install winflexbison3 -y |
| 52 | |
| 53 | # Install 7zip and curl (used by the libevent and zlib build scripts) |
| 54 | RUN choco install 7zip curl -y |
| 55 | |
| 56 | # Install libevent |
| 57 | COPY appveyor\build-libevent.bat C:\TEMP\build-libevent.bat |
| 58 | ENV LIBEVENT_VERSION=2.1.8 |
| 59 | ENV WIN3P=C:\TEMP\WIN3P |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 60 | RUN C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && ` |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 61 | MKDIR C:\TEMP\WIN3P && ` |
| 62 | C:\TEMP\build-libevent.bat && ` |
| 63 | MKDIR C:\Libraries\libevent-%LIBEVENT_VERSION% && ` |
| 64 | MOVE C:\TEMP\WIN3P\libevent-%LIBEVENT_VERSION%-stable\include C:\Libraries\libevent-%LIBEVENT_VERSION% && ` |
| 65 | MOVE C:\TEMP\WIN3P\libevent-%LIBEVENT_VERSION%-stable\lib C:\Libraries\libevent-%LIBEVENT_VERSION% && ` |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 66 | RMDIR /S /Q C:\TEMP\WIN3P && ` |
| 67 | SETX LIBEVENT_ROOT "C:\Libraries\libevent-%LIBEVENT_VERSION%" |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 68 | |
| 69 | # Install zlib |
| 70 | COPY appveyor\build-zlib.bat C:\TEMP\build-zlib.bat |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 71 | ENV ZLIB_VERSION=1.3.1 |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 72 | ENV WIN3P=C:\TEMP\WIN3P |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 73 | RUN C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && ` |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 74 | MKDIR C:\TEMP\WIN3P && ` |
| 75 | C:\TEMP\build-zlib.bat && ` |
| 76 | MOVE C:\TEMP\WIN3P\zlib-inst C:\Libraries\zlib-%ZLIB_VERSION% && ` |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 77 | RMDIR /S /Q C:\TEMP\WIN3P && ` |
| 78 | SETX ZLIB_ROOT "C:\Libraries\zlib-%ZLIB_VERSION%" && ` |
| 79 | SETX PATH "%ZLIB_ROOT%\bin;%PATH%" |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 80 | |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 81 | # Install OpenSSL 3.6.0 |
| 82 | ADD --checksum=sha256:1ae24eb941ff3c11258d0ad4e6d2cba13360cb52a17d8516fb27352b5e3ed6ad https://slproweb.com/download/Win64OpenSSL-3_6_0.exe C:\TEMP\openssl.exe |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 83 | RUN C:\TEMP\openssl.exe /silent && ` |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 84 | DEL C:\TEMP\openssl.exe && ` |
| 85 | SETX OPENSSL_ROOT "C:\OpenSSL-Win64" && ` |
| 86 | SETX PATH "%OPENSSL_ROOT%\bin;%PATH%" |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 87 | |
| 88 | # Install java |
| 89 | RUN choco install jdk8 -y |
| 90 | |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 91 | # Install python3 |
| 92 | RUN choco install python3 -y |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 93 | RUN pip install setuptools |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 94 | |
| James E. King III | 6c26e09 | 2019-02-07 12:48:27 -0500 | [diff] [blame] | 95 | # Install Adobe Flex 4.6 SDK and set FLEX_HOME so it can be found |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 96 | ADD --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 III | 6c26e09 | 2019-02-07 12:48:27 -0500 | [diff] [blame] | 97 | RUN CD C:\Adobe\Flex\SDK\4.6 && ` |
| 98 | 7z x SDK.zip && ` |
| 99 | DEL SDK.zip && ` |
| 100 | SETX FLEX_HOME "C:\Adobe\Flex\SDK\4.6" |
| 101 | |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 102 | RUN choco install nodejs -y |
| 103 | |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 104 | # Start developer command prompt with any other commands specified. |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 105 | ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=x64 -host_arch=x64 && |
| James E. King III | 278528c | 2019-01-11 12:17:44 -0500 | [diff] [blame] | 106 | |
| 107 | # Default to PowerShell if no other command specified. |
| Shaoyu Zhang | 230d0a9 | 2025-11-12 00:08:50 -0800 | [diff] [blame] | 108 | CMD powershell.exe -NoLogo -ExecutionPolicy Bypass |