HADOOP-12562. Make hadoop dockerfile usable by Yetus. Contributed by Allen Wittenauer.

This commit is contained in:
Haohui Mai 2015-11-12 10:17:41 -08:00
parent 9050078005
commit 5d9212c139
2 changed files with 53 additions and 22 deletions

View File

@ -18,26 +18,19 @@
# Dockerfile for installing the necessary dependencies for building Hadoop. # Dockerfile for installing the necessary dependencies for building Hadoop.
# See BUILDING.txt. # See BUILDING.txt.
# FROM dockerfile/java:openjdk-7-jdk
# FROM dockerfile/java:oracle-java7
FROM ubuntu:trusty FROM ubuntu:trusty
WORKDIR /root WORKDIR /root
RUN apt-get update && \ ######
apt-get install -y software-properties-common && \ # Install common dependencies from packages
add-apt-repository -y ppa:webupd8team/java && \ ######
apt-get update
# Auto-accept the Oracle JDK license
RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java7-installer
# Install dependencies from packages
RUN apt-get update && apt-get install --no-install-recommends -y \ RUN apt-get update && apt-get install --no-install-recommends -y \
git curl ant make maven \ git curl ant make maven \
cmake gcc g++ protobuf-compiler \ cmake gcc g++ \
protobuf-compiler libprotoc-dev \
protobuf-c-compiler libprotobuf-dev \
build-essential libtool \ build-essential libtool \
zlib1g-dev pkg-config libssl-dev \ zlib1g-dev pkg-config libssl-dev \
snappy libsnappy-dev \ snappy libsnappy-dev \
@ -45,22 +38,41 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
libjansson-dev \ libjansson-dev \
fuse libfuse-dev \ fuse libfuse-dev \
libcurl4-openssl-dev \ libcurl4-openssl-dev \
python python2.7 python python2.7 pylint \
openjdk-7-jdk doxygen
# Install Forrest # Fixing the Apache commons / Maven dependency problem under Ubuntu:
RUN mkdir -p /usr/local/apache-forrest ; \ # See http://wiki.apache.org/commons/VfsProblems
curl -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \ RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
echo 'forrest.home=/usr/local/apache-forrest' > build.properties
#######
# Oracle Java
#######
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
# Auto-accept the Oracle JDK license
RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java7-installer
# Auto-accept the Oracle JDK license
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
RUN apt-get install -y oracle-java8-installer
######
# Install findbugs # Install findbugs
######
RUN mkdir -p /opt/findbugs && \ RUN mkdir -p /opt/findbugs && \
wget http://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \ curl -L https://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
-O /opt/findbugs.tar.gz && \ -o /opt/findbugs.tar.gz && \
tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs
ENV FINDBUGS_HOME /opt/findbugs ENV FINDBUGS_HOME /opt/findbugs
####
# Install shellcheck # Install shellcheck
####
RUN apt-get install -y cabal-install RUN apt-get install -y cabal-install
RUN cabal update && cabal install shellcheck --global RUN cabal update && cabal install shellcheck --global
@ -68,9 +80,25 @@ RUN cabal update && cabal install shellcheck --global
# See http://wiki.apache.org/commons/VfsProblems # See http://wiki.apache.org/commons/VfsProblems
RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar . RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
###
# Avoid out of memory errors in builds # Avoid out of memory errors in builds
###
ENV MAVEN_OPTS -Xms256m -Xmx512m ENV MAVEN_OPTS -Xms256m -Xmx512m
###
# 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 ; \
curl -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
echo 'forrest.home=/usr/local/apache-forrest' > build.properties
# Add a welcome message and environment checks. # Add a welcome message and environment checks.
ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
RUN chmod 755 /root/hadoop_env_checks.sh RUN chmod 755 /root/hadoop_env_checks.sh

View File

@ -326,6 +326,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11685. StorageException complaining " no lease ID" during HBase HADOOP-11685. StorageException complaining " no lease ID" during HBase
distributed log splitting (Duo Xu via cnauroth) distributed log splitting (Duo Xu via cnauroth)
HADOOP-12562. Make hadoop dockerfile usable by Yetus.
(Allen Wittenauer via wheat9)
OPTIMIZATIONS OPTIMIZATIONS
HADOOP-11785. Reduce the number of listStatus operation in distcp HADOOP-11785. Reduce the number of listStatus operation in distcp