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:16.04
19FROM ${base}
20
21SHELL ["/bin/bash", "-o", "pipefail", "-c"]
22
23ENV DEBIAN_FRONTEND noninteractive
24
25# LLVM 10 or later requires C++ 14 but g++-5's C++ 14 support is limited.
26# cpp/src/arrow/vendored/datetime/date.h doesn't work.
27# ARG llvm
28ENV llvm=8
29RUN apt-get update -y -q && \
30    apt-get install -y -q --no-install-recommends \
31        apt-transport-https \
32        software-properties-common \
33        wget && \
34    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
35    apt-add-repository -y "deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-${llvm} main" && \
36    apt-get update -y -q && \
37    apt-get install -y -q --no-install-recommends \
38        autoconf \
39        ca-certificates \
40        ccache \
41        clang-${llvm} \
42        cmake \
43        g++ \
44        gcc \
45        gdb \
46        git \
47        libboost-all-dev \
48        libbrotli-dev \
49        libbz2-dev \
50        libgoogle-glog-dev \
51        liblz4-dev \
52        libre2-dev \
53        libssl-dev \
54        libutf8proc-dev \
55        libzstd1-dev \
56        llvm-${llvm}-dev \
57        make \
58        ninja-build \
59        pkg-config \
60        protobuf-compiler \
61        python3 \
62        tzdata && \
63    apt-get clean && \
64    rm -rf /var/lib/apt/lists/*
65
66# Benchmark is deactivated as the external project requires CMake 3.6+
67# Gandiva JNI is deactivated as it requires CMake 3.11+
68# - c-ares in Xenial isn't recognized by gRPC build system
69# - libprotobuf-dev / libprotoc-dev in Xenial too old for gRPC
70# - libboost-all-dev does not include Boost.Process, needed for Flight
71#   unit tests, so doing vendored build by default
72ENV ARROW_BUILD_BENCHMARKS=OFF \
73    ARROW_BUILD_TESTS=ON \
74    ARROW_DATASET=ON \
75    ARROW_DEPENDENCY_SOURCE=SYSTEM \
76    ARROW_GANDIVA_JAVA=OFF \
77    ARROW_GANDIVA=ON \
78    ARROW_HOME=/usr/local \
79    ARROW_PARQUET=ON \
80    ARROW_USE_CCACHE=ON \
81    ARROW_WITH_BROTLI=ON \
82    ARROW_WITH_BZ2=ON \
83    ARROW_WITH_LZ4=ON \
84    ARROW_WITH_SNAPPY=ON \
85    ARROW_WITH_ZLIB=ON \
86    ARROW_WITH_ZSTD=ON \
87    BOOST_SOURCE=BUNDLED \
88    cares_SOURCE=BUNDLED \
89    CC=gcc \
90    CXX=g++ \
91    gRPC_SOURCE=BUNDLED \
92    GTest_SOURCE=BUNDLED \
93    ORC_SOURCE=BUNDLED \
94    PARQUET_BUILD_EXAMPLES=ON \
95    PARQUET_BUILD_EXECUTABLES=ON \
96    PATH=/usr/lib/ccache/:$PATH \
97    Protobuf_SOURCE=BUNDLED \
98    RapidJSON_SOURCE=BUNDLED \
99    Snappy_SOURCE=BUNDLED \
100    Thrift_SOURCE=BUNDLED
101