2015-04-24 20:05:18 +00: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.
|
|
|
|
|
2021-01-26 05:15:43 +00:00
|
|
|
FROM ubuntu:focal
|
2015-04-24 20:05:18 +00:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
2018-09-01 23:05:33 +00:00
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
|
2017-10-19 23:33:47 +00:00
|
|
|
#####
|
|
|
|
# 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
|
|
|
|
|
2016-04-28 02:35:51 +00:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV DEBCONF_TERSE true
|
|
|
|
|
2018-09-01 23:05:33 +00:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends \
|
2020-06-19 04:29:44 +00:00
|
|
|
ant \
|
2018-09-01 23:05:33 +00:00
|
|
|
apt-utils \
|
2020-04-25 17:54:45 +00:00
|
|
|
bats \
|
2018-09-01 23:05:33 +00:00
|
|
|
build-essential \
|
|
|
|
bzip2 \
|
|
|
|
clang \
|
2020-04-25 17:54:45 +00:00
|
|
|
cmake \
|
2018-09-01 23:05:33 +00:00
|
|
|
curl \
|
|
|
|
doxygen \
|
2020-06-19 04:29:44 +00:00
|
|
|
findbugs \
|
2018-09-01 23:05:33 +00:00
|
|
|
fuse \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
gnupg-agent \
|
2021-01-26 05:15:43 +00:00
|
|
|
hugo \
|
2020-06-19 04:29:44 +00:00
|
|
|
libbcprov-java \
|
2018-09-01 23:05:33 +00:00
|
|
|
libbz2-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libfuse-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libprotoc-dev \
|
|
|
|
libsasl2-dev \
|
|
|
|
libsnappy-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtool \
|
2020-09-25 05:17:50 +00:00
|
|
|
libzstd-dev \
|
2018-09-01 23:05:33 +00:00
|
|
|
locales \
|
|
|
|
make \
|
2020-06-19 04:29:44 +00:00
|
|
|
maven \
|
2021-01-26 05:15:43 +00:00
|
|
|
nodejs \
|
|
|
|
node-yarn \
|
|
|
|
npm \
|
2020-06-19 04:29:44 +00:00
|
|
|
openjdk-11-jdk \
|
|
|
|
openjdk-8-jdk \
|
2018-09-01 23:05:33 +00:00
|
|
|
pinentry-curses \
|
|
|
|
pkg-config \
|
|
|
|
python \
|
|
|
|
python2.7 \
|
|
|
|
python-pkg-resources \
|
|
|
|
python-setuptools \
|
|
|
|
rsync \
|
2020-04-25 17:54:45 +00:00
|
|
|
shellcheck \
|
2018-09-01 23:05:33 +00:00
|
|
|
software-properties-common \
|
|
|
|
sudo \
|
|
|
|
valgrind \
|
|
|
|
zlib1g-dev \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2015-04-24 20:05:18 +00:00
|
|
|
|
2020-06-19 04:29:44 +00:00
|
|
|
######
|
|
|
|
# Set env vars required to build Hadoop
|
|
|
|
######
|
|
|
|
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-amd64
|
|
|
|
ENV FINDBUGS_HOME /usr
|
2016-05-17 03:25:40 +00:00
|
|
|
|
2020-07-15 04:39:48 +00:00
|
|
|
#######
|
2021-01-26 05:15:43 +00:00
|
|
|
# Install Boost 1.72 (1.71 ships with Focal)
|
2020-07-15 04:39:48 +00:00
|
|
|
#######
|
|
|
|
# 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
|
|
|
|
|
2021-01-26 05:15:43 +00:00
|
|
|
####
|
|
|
|
# Install pip (deprecated from Focal toolchain)
|
|
|
|
####
|
|
|
|
# hadolint ignore=DL3003
|
|
|
|
RUN mkdir -p /opt/pip \
|
|
|
|
&& curl -L https://bootstrap.pypa.io/get-pip.py > get-pip.py \
|
|
|
|
&& mv get-pip.py /opt/pip \
|
|
|
|
&& cd /opt/pip \
|
|
|
|
&& python2.7 get-pip.py \
|
|
|
|
&& cd /root \
|
|
|
|
&& rm -rf /opt/pip
|
|
|
|
|
2019-10-10 16:06:02 +00:00
|
|
|
######
|
2021-01-26 05:15:43 +00:00
|
|
|
# Install Google Protobuf 3.7.1 (3.6.1 ships with Focal)
|
2019-10-10 16:06:02 +00: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"
|
|
|
|
|
2016-04-28 02:35:51 +00:00
|
|
|
####
|
2018-07-19 00:09:43 +00:00
|
|
|
# Install pylint at fixed version (2.0.0 removed python2 support)
|
|
|
|
# https://github.com/PyCQA/pylint/issues/2294
|
2016-04-28 02:35:51 +00:00
|
|
|
####
|
2020-04-04 07:52:04 +00:00
|
|
|
RUN pip2 install \
|
2020-09-16 07:23:57 +00:00
|
|
|
astroid==1.6.6 \
|
|
|
|
isort==4.3.21 \
|
2020-04-04 07:52:04 +00:00
|
|
|
configparser==4.0.2 \
|
|
|
|
pylint==1.9.2
|
2015-04-24 20:05:18 +00:00
|
|
|
|
2016-06-14 23:03:20 +00:00
|
|
|
####
|
|
|
|
# Install dateutil.parser
|
|
|
|
####
|
2018-09-01 23:05:33 +00:00
|
|
|
RUN pip2 install python-dateutil==2.7.3
|
2016-06-14 23:03:20 +00:00
|
|
|
|
2019-12-23 01:30:26 +00:00
|
|
|
####
|
2021-01-26 05:15:43 +00:00
|
|
|
# Install bower
|
|
|
|
####
|
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN npm install -g bower@1.8.8
|
2018-09-01 23:05:33 +00:00
|
|
|
|
|
|
|
###
|
|
|
|
# Install hadolint
|
|
|
|
####
|
|
|
|
RUN curl -L -s -S \
|
|
|
|
https://github.com/hadolint/hadolint/releases/download/v1.11.1/hadolint-Linux-x86_64 \
|
|
|
|
-o /bin/hadolint \
|
|
|
|
&& chmod a+rx /bin/hadolint \
|
|
|
|
&& shasum -a 512 /bin/hadolint | \
|
|
|
|
awk '$1!="734e37c1f6619cbbd86b9b249e69c9af8ee1ea87a2b1ff71dccda412e9dac35e63425225a95d71572091a3f0a11e9a04c2fc25d9e91b840530c26af32b9891ca" {exit(1)}'
|
2016-03-21 21:03:13 +00:00
|
|
|
|
2021-01-22 01:27:06 +00:00
|
|
|
######
|
|
|
|
# Intel ISA-L 2.29.0
|
|
|
|
######
|
|
|
|
# hadolint ignore=DL3003,DL3008
|
|
|
|
RUN mkdir -p /opt/isa-l-src \
|
|
|
|
&& apt-get -q update \
|
|
|
|
&& apt-get install -y --no-install-recommends automake yasm \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& curl -L -s -S \
|
|
|
|
https://github.com/intel/isa-l/archive/v2.29.0.tar.gz \
|
|
|
|
-o /opt/isa-l.tar.gz \
|
|
|
|
&& tar xzf /opt/isa-l.tar.gz --strip-components 1 -C /opt/isa-l-src \
|
|
|
|
&& cd /opt/isa-l-src \
|
|
|
|
&& ./autogen.sh \
|
|
|
|
&& ./configure \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& cd /root \
|
|
|
|
&& rm -rf /opt/isa-l-src
|
|
|
|
|
2017-10-19 23:33:47 +00:00
|
|
|
###
|
|
|
|
# Avoid out of memory errors in builds
|
|
|
|
###
|
2018-03-01 20:53:19 +00:00
|
|
|
ENV MAVEN_OPTS -Xms256m -Xmx1536m
|
2017-10-19 23:33:47 +00:00
|
|
|
|
2020-06-04 07:34:28 +00:00
|
|
|
# Skip gpg verification when downloading Yetus via yetus-wrapper
|
2020-06-03 09:01:37 +00:00
|
|
|
ENV HADOOP_SKIP_YETUS_VERIFICATION true
|
|
|
|
|
2015-11-12 18:17:41 +00: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
|
|
|
|
###
|
|
|
|
|
2015-04-24 20:05:18 +00:00
|
|
|
# Add a welcome message and environment checks.
|
2018-09-01 23:05:33 +00:00
|
|
|
COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh
|
2015-04-24 20:05:18 +00:00
|
|
|
RUN chmod 755 /root/hadoop_env_checks.sh
|
2018-09-01 23:05:33 +00:00
|
|
|
# hadolint ignore=SC2016
|
|
|
|
RUN echo '${HOME}/hadoop_env_checks.sh' >> /root/.bashrc
|