2020-01-13 00:10:29 -05:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# Dockerfile for installing the necessary dependencies for building Hadoop.
|
|
|
|
# See BUILDING.txt.
|
|
|
|
|
2020-07-01 05:57:11 -04:00
|
|
|
FROM ubuntu:bionic
|
2020-01-13 00:10:29 -05:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
|
|
|
|
#####
|
|
|
|
# Disable suggests/recommends
|
|
|
|
#####
|
|
|
|
RUN echo APT::Install-Recommends "0"\; > /etc/apt/apt.conf.d/10disableextras
|
|
|
|
RUN echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV DEBCONF_TERSE true
|
|
|
|
|
|
|
|
######
|
|
|
|
# Install common dependencies from packages. Versions here are either
|
|
|
|
# sufficient or irrelevant.
|
|
|
|
######
|
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends \
|
2020-07-01 05:57:11 -04:00
|
|
|
ant \
|
2020-01-13 00:10:29 -05:00
|
|
|
apt-utils \
|
2020-07-01 05:57:11 -04:00
|
|
|
bats \
|
2020-01-13 00:10:29 -05:00
|
|
|
build-essential \
|
|
|
|
bzip2 \
|
|
|
|
clang \
|
2020-07-01 05:57:11 -04:00
|
|
|
cmake \
|
2020-01-13 00:10:29 -05:00
|
|
|
curl \
|
|
|
|
doxygen \
|
2020-07-01 05:57:11 -04:00
|
|
|
findbugs \
|
2020-01-13 00:10:29 -05:00
|
|
|
fuse \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
gnupg-agent \
|
2020-07-01 05:57:11 -04:00
|
|
|
libbcprov-java \
|
2020-01-13 00:10:29 -05:00
|
|
|
libbz2-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libfuse-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libprotoc-dev \
|
|
|
|
libsasl2-dev \
|
|
|
|
libsnappy-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtool \
|
2020-09-25 01:17:50 -04:00
|
|
|
libzstd-dev \
|
2020-01-13 00:10:29 -05:00
|
|
|
locales \
|
|
|
|
make \
|
2020-07-01 05:57:11 -04:00
|
|
|
maven \
|
|
|
|
openjdk-11-jdk \
|
|
|
|
openjdk-8-jdk \
|
2020-01-13 00:10:29 -05:00
|
|
|
pinentry-curses \
|
|
|
|
pkg-config \
|
|
|
|
python \
|
|
|
|
python2.7 \
|
|
|
|
python-pip \
|
|
|
|
python-pkg-resources \
|
|
|
|
python-setuptools \
|
|
|
|
python-wheel \
|
|
|
|
rsync \
|
2020-07-01 05:57:11 -04:00
|
|
|
shellcheck \
|
2020-01-13 00:10:29 -05:00
|
|
|
software-properties-common \
|
|
|
|
sudo \
|
|
|
|
valgrind \
|
|
|
|
zlib1g-dev \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
######
|
2020-07-01 05:57:11 -04:00
|
|
|
# Set env vars required to build Hadoop
|
2020-01-13 00:10:29 -05:00
|
|
|
######
|
2020-07-01 05:57:11 -04:00
|
|
|
ENV MAVEN_HOME /usr
|
|
|
|
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
|
|
|
|
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
|
|
|
|
ENV FINDBUGS_HOME /usr
|
2020-01-13 00:10:29 -05:00
|
|
|
|
2020-07-15 00:39:48 -04:00
|
|
|
#######
|
|
|
|
# Install Boost 1.72 (1.65 ships with Bionic)
|
|
|
|
#######
|
|
|
|
# hadolint ignore=DL3003
|
|
|
|
RUN mkdir -p /opt/boost-library \
|
|
|
|
&& curl -L https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download > boost_1_72_0.tar.bz2 \
|
|
|
|
&& mv boost_1_72_0.tar.bz2 /opt/boost-library \
|
|
|
|
&& cd /opt/boost-library \
|
|
|
|
&& tar --bzip2 -xf boost_1_72_0.tar.bz2 \
|
|
|
|
&& cd /opt/boost-library/boost_1_72_0 \
|
|
|
|
&& ./bootstrap.sh --prefix=/usr/ \
|
|
|
|
&& ./b2 --without-python install \
|
|
|
|
&& cd /root \
|
|
|
|
&& rm -rf /opt/boost-library
|
|
|
|
|
2020-01-13 00:10:29 -05:00
|
|
|
######
|
2020-07-01 05:57:11 -04:00
|
|
|
# Install Google Protobuf 3.7.1 (3.0.0 ships with Bionic)
|
2020-01-13 00:10:29 -05:00
|
|
|
######
|
|
|
|
# hadolint ignore=DL3003
|
|
|
|
RUN mkdir -p /opt/protobuf-src \
|
|
|
|
&& curl -L -s -S \
|
|
|
|
https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz \
|
|
|
|
-o /opt/protobuf.tar.gz \
|
|
|
|
&& tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src \
|
|
|
|
&& cd /opt/protobuf-src \
|
|
|
|
&& ./configure --prefix=/opt/protobuf \
|
|
|
|
&& make install \
|
|
|
|
&& cd /root \
|
|
|
|
&& rm -rf /opt/protobuf-src
|
|
|
|
ENV PROTOBUF_HOME /opt/protobuf
|
|
|
|
ENV PATH "${PATH}:/opt/protobuf/bin"
|
|
|
|
|
|
|
|
####
|
|
|
|
# Install pylint at fixed version (2.0.0 removed python2 support)
|
|
|
|
# https://github.com/PyCQA/pylint/issues/2294
|
|
|
|
####
|
2020-04-04 03:52:04 -04:00
|
|
|
RUN pip2 install \
|
2020-09-16 03:23:57 -04:00
|
|
|
astroid==1.6.6 \
|
|
|
|
isort==4.3.21 \
|
2020-04-04 03:52:04 -04:00
|
|
|
configparser==4.0.2 \
|
|
|
|
pylint==1.9.2
|
2020-01-13 00:10:29 -05:00
|
|
|
|
|
|
|
####
|
|
|
|
# Install dateutil.parser
|
|
|
|
####
|
|
|
|
RUN pip2 install python-dateutil==2.7.3
|
|
|
|
|
|
|
|
###
|
2020-07-26 11:51:44 -04:00
|
|
|
# Install node.js 10.x for web UI framework (4.2.6 ships with Xenial)
|
2020-01-13 00:10:29 -05:00
|
|
|
###
|
2020-07-26 11:51:44 -04:00
|
|
|
# hadolint ignore=DL3008
|
2020-06-30 03:52:57 -04:00
|
|
|
RUN curl -L -s -S https://deb.nodesource.com/setup_10.x | bash - \
|
2020-07-26 11:51:44 -04:00
|
|
|
&& apt-get install -y --no-install-recommends nodejs \
|
2020-01-13 00:10:29 -05:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& npm install -g bower@1.8.8
|
|
|
|
|
|
|
|
###
|
2021-01-05 22:12:46 -05:00
|
|
|
## Install Yarn 1.22.5 for web UI framework
|
2020-01-13 00:10:29 -05:00
|
|
|
####
|
|
|
|
RUN curl -s -S https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
|
|
&& echo 'deb https://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list \
|
|
|
|
&& apt-get -q update \
|
2021-01-05 22:12:46 -05:00
|
|
|
&& apt-get install -y --no-install-recommends yarn=1.22.5-1 \
|
2020-01-13 00:10:29 -05:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
###
|
|
|
|
# Install phantomjs built for aarch64
|
|
|
|
####
|
|
|
|
RUN mkdir -p /opt/phantomjs \
|
|
|
|
&& curl -L -s -S \
|
|
|
|
https://github.com/liusheng/phantomjs/releases/download/2.1.1/phantomjs-2.1.1-linux-aarch64.tar.bz2 \
|
|
|
|
-o /opt/phantomjs/phantomjs-2.1.1-linux-aarch64.tar.bz2 \
|
|
|
|
&& tar xvjf /opt/phantomjs/phantomjs-2.1.1-linux-aarch64.tar.bz2 --strip-components 1 -C /opt/phantomjs \
|
|
|
|
&& cp /opt/phantomjs/bin/phantomjs /usr/bin/ \
|
|
|
|
&& rm -rf /opt/phantomjs
|
|
|
|
|
|
|
|
###
|
|
|
|
# Avoid out of memory errors in builds
|
|
|
|
###
|
|
|
|
ENV MAVEN_OPTS -Xms256m -Xmx1536m
|
|
|
|
|
2020-06-04 03:34:28 -04:00
|
|
|
# Skip gpg verification when downloading Yetus via yetus-wrapper
|
2020-06-03 05:01:37 -04:00
|
|
|
ENV HADOOP_SKIP_YETUS_VERIFICATION true
|
|
|
|
|
2020-01-13 00:10:29 -05:00
|
|
|
###
|
|
|
|
# Everything past this point is either not needed for testing or breaks Yetus.
|
|
|
|
# So tell Yetus not to read the rest of the file:
|
|
|
|
# YETUS CUT HERE
|
|
|
|
###
|
|
|
|
|
|
|
|
# Hugo static website generator (for new hadoop site docs)
|
|
|
|
RUN curl -L -o hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.58.3/hugo_0.58.3_Linux-ARM64.deb \
|
|
|
|
&& dpkg --install hugo.deb \
|
|
|
|
&& rm hugo.deb
|
|
|
|
|
|
|
|
|
|
|
|
# Add a welcome message and environment checks.
|
|
|
|
COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh
|
|
|
|
RUN chmod 755 /root/hadoop_env_checks.sh
|
|
|
|
# hadolint ignore=SC2016
|
|
|
|
RUN echo '${HOME}/hadoop_env_checks.sh' >> /root/.bashrc
|