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.
|
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
|
2015-05-07 14:46:32 -04:00
|
|
|
FROM ubuntu:trusty
|
2015-04-24 16:05:18 -04:00
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
2016-06-24 21:41:29 -04:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
ENV DEBCONF_TERSE true
|
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
######
|
|
|
|
# Install common dependencies from packages
|
|
|
|
######
|
2016-06-24 21:41:29 -04:00
|
|
|
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
|
2016-06-16 01:02:30 -04:00
|
|
|
ant \
|
|
|
|
build-essential \
|
|
|
|
bzip2 \
|
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
doxygen \
|
|
|
|
fuse \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
gnupg-agent \
|
|
|
|
make \
|
|
|
|
maven \
|
|
|
|
libbz2-dev \
|
2015-04-24 16:05:18 -04:00
|
|
|
libcurl4-openssl-dev \
|
2016-06-16 01:02:30 -04:00
|
|
|
libfuse-dev \
|
|
|
|
libjansson-dev \
|
|
|
|
libprotobuf-dev \
|
|
|
|
libprotoc-dev \
|
|
|
|
libsnappy-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtool \
|
|
|
|
openjdk-7-jdk \
|
|
|
|
pinentry-curses \
|
|
|
|
pkg-config \
|
|
|
|
protobuf-compiler \
|
|
|
|
protobuf-c-compiler \
|
|
|
|
python \
|
|
|
|
python2.7 \
|
2017-04-14 19:56:16 -04:00
|
|
|
python2.7-dev \
|
2016-06-24 21:41:29 -04:00
|
|
|
python-pip \
|
2016-06-23 02:11:58 -04:00
|
|
|
rsync \
|
2016-06-16 01:02:30 -04:00
|
|
|
snappy \
|
|
|
|
zlib1g-dev
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2017-10-12 18:29:08 -04:00
|
|
|
######
|
|
|
|
# Install Apache Maven
|
|
|
|
######
|
|
|
|
RUN mkdir -p /opt/maven && \
|
|
|
|
curl -L -s -S \
|
|
|
|
http://www-us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \
|
|
|
|
-o /opt/maven.tar.gz && \
|
|
|
|
tar xzf /opt/maven.tar.gz --strip-components 1 -C /opt/maven
|
|
|
|
ENV MAVEN_HOME /opt/maven
|
|
|
|
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
#######
|
2017-09-08 16:07:52 -04:00
|
|
|
# Java OpenJDK
|
2015-11-12 13:17:41 -05:00
|
|
|
#######
|
|
|
|
|
2016-06-24 21:41:29 -04:00
|
|
|
RUN echo "dot_style = mega" > "/root/.wgetrc"
|
|
|
|
RUN echo "quiet = on" >> "/root/.wgetrc"
|
|
|
|
|
|
|
|
RUN apt-get -q install --no-install-recommends -y software-properties-common
|
2015-11-12 13:17:41 -05:00
|
|
|
RUN add-apt-repository -y ppa:webupd8team/java
|
2016-06-24 21:41:29 -04:00
|
|
|
RUN apt-get -q update
|
2015-11-12 13:17:41 -05:00
|
|
|
|
2017-09-08 16:07:52 -04:00
|
|
|
# Install OpenJDK 7
|
|
|
|
RUN apt-get -q install --no-install-recommends -y openjdk-7-jdk
|
2015-11-12 13:17:41 -05:00
|
|
|
|
|
|
|
######
|
2018-03-04 10:01:11 -05:00
|
|
|
# Install spotbugs (successor of findbugs)
|
2015-11-12 13:17:41 -05:00
|
|
|
######
|
2018-03-04 10:01:11 -05:00
|
|
|
RUN mkdir -p /opt/spotbugs && \
|
2016-06-24 21:41:29 -04:00
|
|
|
curl -L -s -S \
|
2018-03-04 10:01:11 -05:00
|
|
|
http://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/3.1.2/spotbugs-3.1.2.tgz \
|
|
|
|
-o /opt/spotbugs.tar.gz && \
|
|
|
|
tar xzf /opt/spotbugs.tar.gz --strip-components 1 -C /opt/spotbugs
|
|
|
|
# Hadoop uses FINDBUGS_HOME to run spotbugs
|
|
|
|
ENV FINDBUGS_HOME /opt/spotbugs
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
####
|
2015-04-24 16:05:18 -04:00
|
|
|
# Install shellcheck
|
2015-11-12 13:17:41 -05:00
|
|
|
####
|
2016-06-24 21:41:29 -04:00
|
|
|
RUN apt-get -q install -y cabal-install
|
|
|
|
RUN mkdir /root/.cabal
|
|
|
|
RUN echo "remote-repo: hackage.fpcomplete.com:http://hackage.fpcomplete.com/" >> /root/.cabal/config
|
|
|
|
#RUN echo "remote-repo: hackage.haskell.org:http://hackage.haskell.org/" > /root/.cabal/config
|
|
|
|
RUN echo "remote-repo-cache: /root/.cabal/packages" >> /root/.cabal/config
|
|
|
|
RUN cabal update
|
|
|
|
RUN cabal install shellcheck --global
|
|
|
|
|
|
|
|
####
|
|
|
|
# Install bats
|
|
|
|
####
|
|
|
|
RUN add-apt-repository -y ppa:duggan/bats
|
|
|
|
RUN apt-get -q update
|
|
|
|
RUN apt-get -q install --no-install-recommends -y bats
|
|
|
|
|
|
|
|
####
|
|
|
|
# Install pylint
|
|
|
|
####
|
2018-07-31 16:28:49 -04:00
|
|
|
RUN pip install pylint==1.9.2
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2016-06-14 19:03:20 -04:00
|
|
|
####
|
|
|
|
# Install dateutil.parser
|
|
|
|
####
|
|
|
|
RUN pip install python-dateutil
|
|
|
|
|
2015-11-12 13:17:41 -05:00
|
|
|
###
|
2015-04-24 16:05:18 -04:00
|
|
|
# Avoid out of memory errors in builds
|
2015-11-12 13:17:41 -05:00
|
|
|
###
|
2018-03-01 15:53:19 -05:00
|
|
|
ENV MAVEN_OPTS -Xms256m -Xmx1536m
|
2015-04-24 16:05:18 -04:00
|
|
|
|
2016-03-21 17:03:13 -04:00
|
|
|
###
|
|
|
|
# Install node js tools for web UI frameowkr
|
|
|
|
###
|
2019-01-17 05:03:21 -05:00
|
|
|
RUN apt-get -q update \
|
|
|
|
&& apt-get install -y --no-install-recommends nodejs npm \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& ln -s /usr/bin/nodejs /usr/bin/node \
|
|
|
|
&& npm config set strict-ssl false \
|
|
|
|
&& npm install npm@latest -g \
|
|
|
|
&& npm install -g jshint
|
2016-03-21 17:03:13 -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
|
|
|
|
###
|
|
|
|
|
|
|
|
####
|
|
|
|
# Install Forrest (for Apache Hadoop website)
|
|
|
|
###
|
|
|
|
RUN mkdir -p /usr/local/apache-forrest ; \
|
2016-06-24 21:41:29 -04:00
|
|
|
curl -s -S -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
|
2015-11-12 13:17:41 -05:00
|
|
|
tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
|
|
|
|
echo 'forrest.home=/usr/local/apache-forrest' > build.properties
|
|
|
|
|
2015-04-24 16:05:18 -04:00
|
|
|
# Add a welcome message and environment checks.
|
|
|
|
ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
|
|
|
|
RUN chmod 755 /root/hadoop_env_checks.sh
|
|
|
|
RUN echo '~/hadoop_env_checks.sh' >> /root/.bashrc
|
|
|
|
|