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 18ARG base=amd64/ubuntu:18.04 19FROM ${base} 20 21# pipefail is enabled for proper error detection in the `wget | apt-key add` 22# step 23SHELL ["/bin/bash", "-o", "pipefail", "-c"] 24 25ENV DEBIAN_FRONTEND=noninteractive 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. 31ARG clang_tools 32ARG llvm 33RUN apt-get update -y -q && \ 34 apt-get install -y -q --no-install-recommends \ 35 apt-transport-https \ 36 ca-certificates \ 37 gnupg \ 38 wget && \ 39 wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ 40 echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-${llvm} main" > \ 41 /etc/apt/sources.list.d/llvm.list && \ 42 if [ "${clang_tools}" != "${llvm}" -a "${clang_tools}" -ge 10 ]; then \ 43 echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-${clang_tools} main" > \ 44 /etc/apt/sources.list.d/clang-tools.list; \ 45 fi && \ 46 apt-get update -y -q && \ 47 apt-get install -y -q --no-install-recommends \ 48 clang-${clang_tools} \ 49 clang-${llvm} \ 50 clang-format-${clang_tools} \ 51 clang-tidy-${clang_tools} \ 52 llvm-${llvm}-dev && \ 53 apt-get clean && \ 54 rm -rf /var/lib/apt/lists* 55 56# Installs C++ toolchain and dependencies 57RUN apt-get update -y -q && \ 58 apt-get install -y -q --no-install-recommends \ 59 autoconf \ 60 ca-certificates \ 61 ccache \ 62 cmake \ 63 g++ \ 64 gcc \ 65 gdb \ 66 git \ 67 libbenchmark-dev \ 68 libboost-filesystem-dev \ 69 libboost-system-dev \ 70 libbrotli-dev \ 71 libbz2-dev \ 72 libc-ares-dev \ 73 libcurl4-openssl-dev \ 74 libgflags-dev \ 75 libgoogle-glog-dev \ 76 liblz4-dev \ 77 libprotobuf-dev \ 78 libprotoc-dev \ 79 libre2-dev \ 80 libsnappy-dev \ 81 libssl-dev \ 82 ninja-build \ 83 pkg-config \ 84 protobuf-compiler \ 85 rapidjson-dev \ 86 tzdata && \ 87 apt-get clean && \ 88 rm -rf /var/lib/apt/lists* 89 90# Prioritize system packages and local installation 91# The following dependencies will be downloaded due to missing/invalid packages 92# provided by the distribution: 93# - libc-ares-dev does not install CMake config files 94# - flatbuffer is not packaged 95# - libgtest-dev only provide sources 96# - libprotobuf-dev only provide sources 97# - thrift is too old 98# - utf8proc is too old(v2.1.0) 99# - s3 tests would require boost-asio that is included since Boost 1.66.0 100ENV ARROW_BUILD_TESTS=ON \ 101 ARROW_DATASET=ON \ 102 ARROW_DEPENDENCY_SOURCE=SYSTEM \ 103 ARROW_FLIGHT=OFF \ 104 ARROW_GANDIVA=ON \ 105 ARROW_HDFS=ON \ 106 ARROW_HOME=/usr/local \ 107 ARROW_INSTALL_NAME_RPATH=OFF \ 108 ARROW_NO_DEPRECATED_API=ON \ 109 ARROW_ORC=ON \ 110 ARROW_PARQUET=ON \ 111 ARROW_PLASMA=ON \ 112 ARROW_USE_ASAN=OFF \ 113 ARROW_USE_CCACHE=ON \ 114 ARROW_USE_TSAN=OFF \ 115 ARROW_USE_UBSAN=OFF \ 116 ARROW_WITH_BROTLI=ON \ 117 ARROW_WITH_BZ2=ON \ 118 ARROW_WITH_LZ4=ON \ 119 ARROW_WITH_SNAPPY=ON \ 120 ARROW_WITH_ZLIB=ON \ 121 ARROW_WITH_ZSTD=ON \ 122 AWSSDK_SOURCE=BUNDLED \ 123 GTest_SOURCE=BUNDLED \ 124 ORC_SOURCE=BUNDLED \ 125 PARQUET_BUILD_EXAMPLES=ON \ 126 PARQUET_BUILD_EXECUTABLES=ON \ 127 PATH=/usr/lib/ccache/:$PATH \ 128 Thrift_SOURCE=BUNDLED \ 129 utf8proc_SOURCE=BUNDLED \ 130 zstd_SOURCE=BUNDLED 131