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