2015-04-24 16:05:18 -04: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.
|
|
|
|
|
2017-10-19 19:33:47 -04:00
|
|
|
FROM ubuntu:xenial
|
2015-04-24 16:05:18 -04:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
2018-09-01 19:05:33 -04:00
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
|
2017-10-19 19:33:47 -04: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-27 22:35:51 -04:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV DEBCONF_TERSE true
|
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
######
|
2017-10-19 19:33:47 -04:00
|
|
|
# Install common dependencies from packages. Versions here are either
|
|
|
|
# sufficient or irrelevant.
|
2016-05-16 23:25:40 -04:00
|
|
|
#
|
|
|
|
# WARNING: DO NOT PUT JAVA APPS HERE! Otherwise they will install default
|
|
|
|
# Ubuntu Java. See Java section below!
|
2015-11-12 13:17:41 -05:00
|
|
|
######
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends \
|
|
|
|
apt-utils \
|
|
|
|
build-essential \
|
|
|
|
bzip2 \
|
|
|
|
clang \
|
|
|
|
curl \
|
|
|
|
doxygen \
|
|
|
|
fuse \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
gnupg-agent \
|
|
|
|
libbz2-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libfuse-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libprotoc-dev \
|
|
|
|
libsasl2-dev \
|
|
|
|
libsnappy-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtool \
|
2018-10-24 00:49:28 -04:00
|
|
|
libzstd1-dev \
|
2018-09-01 19:05:33 -04:00
|
|
|
locales \
|
|
|
|
make \
|
|
|
|
pinentry-curses \
|
|
|
|
pkg-config \
|
|
|
|
python \
|
|
|
|
python2.7 \
|
|
|
|
python-pip \
|
|
|
|
python-pkg-resources \
|
|
|
|
python-setuptools \
|
|
|
|
python-wheel \
|
|
|
|
rsync \
|
|
|
|
software-properties-common \
|
|
|
|
snappy \
|
|
|
|
sudo \
|
|
|
|
valgrind \
|
|
|
|
zlib1g-dev \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2015-04-24 16:05:18 -04:00
|
|
|
|
|
|
|
|
2017-10-19 19:33:47 -04:00
|
|
|
#######
|
2018-09-01 19:05:33 -04:00
|
|
|
# OpenJDK 8
|
2017-10-19 19:33:47 -04:00
|
|
|
#######
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends openjdk-8-jdk libbcprov-java \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2016-05-16 23:25:40 -04:00
|
|
|
|
2017-07-19 20:51:14 -04:00
|
|
|
|
|
|
|
######
|
2017-10-19 19:33:47 -04:00
|
|
|
# Install cmake 3.1.0 (3.5.1 ships with Xenial)
|
2017-07-19 20:51:14 -04:00
|
|
|
######
|
2018-09-01 19:05:33 -04:00
|
|
|
RUN mkdir -p /opt/cmake \
|
|
|
|
&& curl -L -s -S \
|
2017-10-19 19:33:47 -04:00
|
|
|
https://cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz \
|
2018-09-01 19:05:33 -04:00
|
|
|
-o /opt/cmake.tar.gz \
|
|
|
|
&& tar xzf /opt/cmake.tar.gz --strip-components 1 -C /opt/cmake
|
2017-07-19 20:51:14 -04:00
|
|
|
ENV CMAKE_HOME /opt/cmake
|
|
|
|
ENV PATH "${PATH}:/opt/cmake/bin"
|
2016-05-16 23:25:40 -04:00
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
######
|
2017-10-19 19:33:47 -04:00
|
|
|
# Install Google Protobuf 2.5.0 (2.6.0 ships with Xenial)
|
2015-11-12 13:17:41 -05:00
|
|
|
######
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3003
|
|
|
|
RUN mkdir -p /opt/protobuf-src \
|
|
|
|
&& curl -L -s -S \
|
2017-10-19 19:33:47 -04:00
|
|
|
https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz \
|
2018-09-01 19:05:33 -04:00
|
|
|
-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
|
2017-10-19 19:33:47 -04:00
|
|
|
ENV PROTOBUF_HOME /opt/protobuf
|
|
|
|
ENV PATH "${PATH}:/opt/protobuf/bin"
|
|
|
|
|
|
|
|
######
|
|
|
|
# Install Apache Maven 3.3.9 (3.3.9 ships with Xenial)
|
|
|
|
######
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends maven \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2017-10-19 19:33:47 -04:00
|
|
|
ENV MAVEN_HOME /usr
|
|
|
|
|
|
|
|
######
|
|
|
|
# Install findbugs 3.0.1 (3.0.1 ships with Xenial)
|
2017-10-25 11:08:22 -04:00
|
|
|
# Ant is needed for findbugs
|
2017-10-19 19:33:47 -04:00
|
|
|
######
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends findbugs ant \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2017-10-19 19:33:47 -04:00
|
|
|
ENV FINDBUGS_HOME /usr
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
####
|
2017-10-19 19:33:47 -04:00
|
|
|
# Install shellcheck (0.4.6, the latest as of 2017-09-26)
|
2015-11-12 13:17:41 -05:00
|
|
|
####
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
2019-12-11 11:55:05 -05:00
|
|
|
RUN add-apt-repository -y ppa:hvr/ghc \
|
2018-09-01 19:05:33 -04:00
|
|
|
&& apt-get -q update \
|
2019-12-11 11:55:05 -05:00
|
|
|
&& apt-get -q install -y --no-install-recommends shellcheck ghc-8.0.2 \
|
2018-09-01 19:05:33 -04:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
####
|
2017-10-19 19:33:47 -04:00
|
|
|
# Install bats (0.4.0, the latest as of 2017-09-26, ships with Xenial)
|
2015-11-12 13:17:41 -05:00
|
|
|
####
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends bats \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2016-04-27 22:35:51 -04:00
|
|
|
|
|
|
|
####
|
2018-07-18 20:09:43 -04:00
|
|
|
# Install pylint at fixed version (2.0.0 removed python2 support)
|
|
|
|
# https://github.com/PyCQA/pylint/issues/2294
|
2016-04-27 22:35:51 -04:00
|
|
|
####
|
2020-04-04 03:52:04 -04:00
|
|
|
RUN pip2 install \
|
|
|
|
configparser==4.0.2 \
|
2020-07-08 22:35:52 -04:00
|
|
|
pylint==1.9.2 \
|
|
|
|
isort==4.3.21
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2016-06-14 19:03:20 -04:00
|
|
|
####
|
|
|
|
# Install dateutil.parser
|
|
|
|
####
|
2018-09-01 19:05:33 -04:00
|
|
|
RUN pip2 install python-dateutil==2.7.3
|
2016-06-14 19:03:20 -04:00
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
###
|
2019-12-22 20:30:26 -05:00
|
|
|
# Install node.js 8.17.0 for web UI framework (4.2.6 ships with Xenial)
|
2016-03-21 17:03:13 -04:00
|
|
|
###
|
2019-12-22 20:30:26 -05:00
|
|
|
RUN curl -L -s -S https://deb.nodesource.com/setup_8.x | bash - \
|
|
|
|
&& apt-get install -y --no-install-recommends nodejs=8.17.0-1nodesource1 \
|
2018-09-01 19:05:33 -04:00
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2019-12-22 20:30:26 -05:00
|
|
|
&& npm install -g bower@1.8.8
|
|
|
|
|
|
|
|
###
|
|
|
|
## Install Yarn 1.12.1 for web UI framework
|
|
|
|
####
|
|
|
|
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 \
|
|
|
|
&& apt-get install -y --no-install-recommends yarn=1.12.1-1 \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2018-09-01 19:05:33 -04: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 17:03:13 -04:00
|
|
|
|
2017-10-19 19:33:47 -04:00
|
|
|
###
|
|
|
|
# Avoid out of memory errors in builds
|
|
|
|
###
|
2018-03-01 15:53:19 -05:00
|
|
|
ENV MAVEN_OPTS -Xms256m -Xmx1536m
|
2017-10-19 19:33:47 -04:00
|
|
|
|
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
|
2017-10-19 19:33:47 -04:00
|
|
|
|
2015-11-12 13:17:41 -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
|
|
|
|
###
|
|
|
|
|
|
|
|
####
|
2017-10-25 11:08:22 -04:00
|
|
|
# Install svn & Forrest (for Apache Hadoop website)
|
2015-11-12 13:17:41 -05:00
|
|
|
###
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=DL3008
|
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get -q install -y --no-install-recommends subversion \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN mkdir -p /opt/apache-forrest \
|
|
|
|
&& curl -L -s -S \
|
2017-10-19 19:33:47 -04:00
|
|
|
https://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz \
|
2018-09-01 19:05:33 -04:00
|
|
|
-o /opt/forrest.tar.gz \
|
|
|
|
&& tar xzf /opt/forrest.tar.gz --strip-components 1 -C /opt/apache-forrest
|
2017-10-19 19:33:47 -04:00
|
|
|
RUN echo 'forrest.home=/opt/apache-forrest' > build.properties
|
|
|
|
ENV FORREST_HOME=/opt/apache-forrest
|
2015-11-12 13:17:41 -05:00
|
|
|
|
2017-10-26 13:13:37 -04:00
|
|
|
# Hugo static website generator (for new hadoop site and Ozone docs)
|
2018-09-01 19:05:33 -04:00
|
|
|
RUN curl -L -o hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.30.2/hugo_0.30.2_Linux-64bit.deb \
|
|
|
|
&& dpkg --install hugo.deb \
|
|
|
|
&& rm hugo.deb
|
2017-10-26 13:13:37 -04:00
|
|
|
|
2015-04-24 16:05:18 -04:00
|
|
|
# Add a welcome message and environment checks.
|
2018-09-01 19:05:33 -04:00
|
|
|
COPY hadoop_env_checks.sh /root/hadoop_env_checks.sh
|
2015-04-24 16:05:18 -04:00
|
|
|
RUN chmod 755 /root/hadoop_env_checks.sh
|
2018-09-01 19:05:33 -04:00
|
|
|
# hadolint ignore=SC2016
|
|
|
|
RUN echo '${HOME}/hadoop_env_checks.sh' >> /root/.bashrc
|