|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +# NOTE: You must update PYTHON_WHEEL_WINDOWS_IMAGE_REVISION in .env |
| 19 | +# when you update this file. |
| 20 | + |
| 21 | +# based on mcr.microsoft.com/windows/servercore:ltsc2019 |
| 22 | +# contains choco and vs2019 preinstalled |
| 23 | +FROM abrarov/msvc-2019:2.11.0 |
| 24 | + |
| 25 | +# Install CMake and Ninja |
| 26 | +ARG cmake=3.31.2 |
| 27 | +RUN choco install --no-progress -r -y cmake --version=%cmake% --installargs 'ADD_CMAKE_TO_PATH=System' && \ |
| 28 | + choco install --no-progress -r -y gzip wget ninja |
| 29 | + |
| 30 | +# Add unix tools to path |
| 31 | +RUN setx path "%path%;C:\Program Files\Git\usr\bin" |
| 32 | + |
| 33 | +# Install vcpkg |
| 34 | +# |
| 35 | +# Compiling vcpkg itself from a git tag doesn't work anymore since vcpkg has |
| 36 | +# started to ship precompiled binaries for the vcpkg-tool. |
| 37 | +ARG vcpkg |
| 38 | +COPY ci/vcpkg/*.patch \ |
| 39 | + ci/vcpkg/*windows*.cmake \ |
| 40 | + arrow/ci/vcpkg/ |
| 41 | +COPY ci/scripts/install_vcpkg.sh arrow/ci/scripts/ |
| 42 | +ENV VCPKG_ROOT=C:\\vcpkg |
| 43 | +RUN bash arrow/ci/scripts/install_vcpkg.sh /c/vcpkg %vcpkg% && \ |
| 44 | + setx PATH "%PATH%;%VCPKG_ROOT%" |
| 45 | + |
| 46 | +# Configure vcpkg and install dependencies |
| 47 | +# NOTE: use windows batch environment notation for build arguments in RUN |
| 48 | +# statements but bash notation in ENV statements |
| 49 | +# VCPKG_FORCE_SYSTEM_BINARIES=1 spare around ~750MB of image size if the system |
| 50 | +# cmake's and ninja's versions are recent enough |
| 51 | +ARG build_type=release |
| 52 | +ENV CMAKE_BUILD_TYPE=${build_type} \ |
| 53 | + VCPKG_OVERLAY_TRIPLETS=C:\\arrow\\ci\\vcpkg \ |
| 54 | + VCPKG_DEFAULT_TRIPLET=amd64-windows-static-md-${build_type} \ |
| 55 | + VCPKG_FEATURE_FLAGS="manifests" |
| 56 | +COPY ci/vcpkg/vcpkg.json arrow/ci/vcpkg/ |
| 57 | +# cannot use the S3 feature here because while aws-sdk-cpp=1.9.160 contains |
| 58 | +# ssl related fixes as well as we can patch the vcpkg portfile to support |
| 59 | +# arm machines it hits ARROW-15141 where we would need to fall back to 1.8.186 |
| 60 | +# but we cannot patch those portfiles since vcpkg-tool handles the checkout of |
| 61 | +# previous versions => use bundled S3 build |
| 62 | +RUN vcpkg install \ |
| 63 | + --clean-after-build \ |
| 64 | + --x-install-root=%VCPKG_ROOT%\installed \ |
| 65 | + --x-manifest-root=arrow/ci/vcpkg \ |
| 66 | + --x-feature=flight \ |
| 67 | + --x-feature=gcs \ |
| 68 | + --x-feature=json \ |
| 69 | + --x-feature=orc \ |
| 70 | + --x-feature=parquet \ |
| 71 | + --x-feature=s3 |
| 72 | + |
| 73 | +# Remove previous installations of Python from the base image |
| 74 | +# NOTE: a more recent base image (tried with 2.12.1) comes with Python 3.9.7 |
| 75 | +# and the MSI installers are failing to remove pip and tcl/tk "products" making |
| 76 | +# the subsequent choco python installation step failing for installing Python |
| 77 | +# version 3.9.* due to existing Python version |
| 78 | +RUN wmic product where "name like 'python%%'" call uninstall /nointeractive && \ |
| 79 | + rm -rf Python* |
0 commit comments