HADOOP-13067. cleanup the dockerfile. Contributed by Allen Wittenauer.

This commit is contained in:
Akira Ajisaka 2016-06-25 10:41:29 +09:00
parent ae90d4dd90
commit b59b8b7351
2 changed files with 36 additions and 12 deletions

View File

@ -280,7 +280,7 @@ function stopgpgagent
function usage
{
echo "--artifactsdir=[path] Path to use to store release bits"
echo "--asfrelease Make an ASF release"
echo "--asfrelease Make an ASF release"
echo "--docker Use Hadoop's Dockerfile for guaranteed environment"
echo "--dockercache Use a Docker-private maven cache"
echo "--logdir=[path] Path to store logs"
@ -658,4 +658,4 @@ if [[ $? == 0 ]]; then
run ls -1 "${ARTIFACTS_DIR}"
echo
fi
fi

View File

@ -23,10 +23,13 @@ FROM ubuntu:trusty
WORKDIR /root
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_TERSE true
######
# Install common dependencies from packages
######
RUN apt-get update && apt-get install --no-install-recommends -y \
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
ant \
build-essential \
bzip2 \
@ -56,7 +59,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
protobuf-c-compiler \
python \
python2.7 \
pylint \
python-pip \
rsync \
snappy \
zlib1g-dev
@ -69,23 +72,27 @@ RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
# Oracle Java
#######
RUN apt-get install -y software-properties-common
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
RUN add-apt-repository -y ppa:webupd8team/java
RUN apt-get update
RUN apt-get -q 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
RUN apt-get -q install --no-install-recommends -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
RUN apt-get -q install --no-install-recommends -y oracle-java8-installer
######
# Install findbugs
######
RUN mkdir -p /opt/findbugs && \
curl -L https://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
curl -L -s -S \
https://sourceforge.net/projects/findbugs/files/findbugs/3.0.1/findbugs-noUpdateChecks-3.0.1.tar.gz/download \
-o /opt/findbugs.tar.gz && \
tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs
ENV FINDBUGS_HOME /opt/findbugs
@ -93,8 +100,25 @@ ENV FINDBUGS_HOME /opt/findbugs
####
# Install shellcheck
####
RUN apt-get install -y cabal-install
RUN cabal update && cabal install shellcheck --global
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
####
RUN pip install pylint
####
# Install dateutil.parser
@ -116,7 +140,7 @@ ENV MAVEN_OPTS -Xms256m -Xmx512m
# 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 ; \
curl -s -S -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