]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/ci/docker/ubuntu-20.04-cpp.dockerfile
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / ci / docker / ubuntu-20.04-cpp.dockerfile
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 ARG base=amd64/ubuntu:20.04
19 FROM ${base}
20 ARG arch
21
22 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
23
24 RUN echo "debconf debconf/frontend select Noninteractive" | \
25 debconf-set-selections
26
27 # Installs LLVM toolchain, for Gandiva and testing other compilers
28 #
29 # Note that this is installed before the base packages to improve iteration
30 # while debugging package list with docker build.
31 ARG clang_tools
32 ARG llvm
33 RUN if [ "${llvm}" -gt "10" ]; then \
34 apt-get update -y -q && \
35 apt-get install -y -q --no-install-recommends \
36 apt-transport-https \
37 ca-certificates \
38 gnupg \
39 wget && \
40 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
41 echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${llvm} main" > \
42 /etc/apt/sources.list.d/llvm.list && \
43 if [ "${clang_tools}" != "${llvm}" -a "${clang_tools}" -gt 10 ]; then \
44 echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${clang_tools} main" > \
45 /etc/apt/sources.list.d/clang-tools.list; \
46 fi \
47 fi && \
48 apt-get update -y -q && \
49 apt-get install -y -q --no-install-recommends \
50 clang-${clang_tools} \
51 clang-${llvm} \
52 clang-format-${clang_tools} \
53 clang-tidy-${clang_tools} \
54 llvm-${llvm}-dev && \
55 apt-get clean && \
56 rm -rf /var/lib/apt/lists*
57
58 # Installs C++ toolchain and dependencies
59 RUN apt-get update -y -q && \
60 apt-get install -y -q --no-install-recommends \
61 autoconf \
62 ca-certificates \
63 ccache \
64 cmake \
65 g++ \
66 gcc \
67 gdb \
68 git \
69 libbenchmark-dev \
70 libboost-filesystem-dev \
71 libboost-system-dev \
72 libbrotli-dev \
73 libbz2-dev \
74 libc-ares-dev \
75 libcurl4-openssl-dev \
76 libgflags-dev \
77 libgoogle-glog-dev \
78 liblz4-dev \
79 libprotobuf-dev \
80 libprotoc-dev \
81 libre2-dev \
82 libsnappy-dev \
83 libssl-dev \
84 libthrift-dev \
85 libutf8proc-dev \
86 libzstd-dev \
87 make \
88 ninja-build \
89 pkg-config \
90 protobuf-compiler \
91 python3-pip \
92 rapidjson-dev \
93 tzdata \
94 wget && \
95 apt-get clean && \
96 rm -rf /var/lib/apt/lists*
97
98 COPY ci/scripts/install_minio.sh /arrow/ci/scripts/
99 RUN /arrow/ci/scripts/install_minio.sh ${arch} linux latest /usr/local
100 COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/
101 RUN /arrow/ci/scripts/install_gcs_testbench.sh ${arch} default
102
103 # Prioritize system packages and local installation
104 # The following dependencies will be downloaded due to missing/invalid packages
105 # provided by the distribution:
106 # - libc-ares-dev does not install CMake config files
107 # - flatbuffer is not packaged
108 # - libgtest-dev only provide sources
109 # - libprotobuf-dev only provide sources
110 ENV ARROW_BUILD_TESTS=ON \
111 ARROW_DEPENDENCY_SOURCE=SYSTEM \
112 ARROW_DATASET=ON \
113 ARROW_FLIGHT=OFF \
114 ARROW_GANDIVA=ON \
115 ARROW_GCS=ON \
116 ARROW_HDFS=ON \
117 ARROW_HOME=/usr/local \
118 ARROW_INSTALL_NAME_RPATH=OFF \
119 ARROW_NO_DEPRECATED_API=ON \
120 ARROW_ORC=ON \
121 ARROW_PARQUET=ON \
122 ARROW_PLASMA=ON \
123 ARROW_S3=ON \
124 ARROW_USE_ASAN=OFF \
125 ARROW_USE_CCACHE=ON \
126 ARROW_USE_UBSAN=OFF \
127 ARROW_WITH_BROTLI=ON \
128 ARROW_WITH_BZ2=ON \
129 ARROW_WITH_LZ4=ON \
130 ARROW_WITH_SNAPPY=ON \
131 ARROW_WITH_ZLIB=ON \
132 ARROW_WITH_ZSTD=ON \
133 ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-${llvm}/bin/llvm-symbolizer \
134 AWSSDK_SOURCE=BUNDLED \
135 google_cloud_cpp_storage_SOURCE=BUNDLED \
136 GTest_SOURCE=BUNDLED \
137 gRPC_SOURCE=BUNDLED \
138 ORC_SOURCE=BUNDLED \
139 PARQUET_BUILD_EXAMPLES=ON \
140 PARQUET_BUILD_EXECUTABLES=ON \
141 PATH=/usr/lib/ccache/:$PATH \
142 Protobuf_SOURCE=BUNDLED \
143 PYTHON=python3