فهرست منبع

HADOOP-13067. cleanup the dockerfile

Allen Wittenauer 9 سال پیش
والد
کامیت
cf2ee45f71
2فایلهای تغییر یافته به همراه33 افزوده شده و 16 حذف شده
  1. 2 2
      dev-support/bin/create-release
  2. 31 14
      dev-support/docker/Dockerfile

+ 2 - 2
dev-support/bin/create-release

@@ -266,7 +266,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"
@@ -620,4 +620,4 @@ if [[ $? == 0 ]]; then
   run ls -1 "${ARTIFACTS_DIR}"
 
   echo
-fi
+fi

+ 31 - 14
dev-support/docker/Dockerfile

@@ -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 \
     snappy \
     zlib1g-dev
 
@@ -67,32 +70,36 @@ RUN cd /usr/share/maven/lib && ln -s ../../java/commons-lang.jar .
 ######
 # Install ISA-L library
 ######
-RUN curl -L http://http.us.debian.org/debian/pool/main/libi/libisal/libisal2_2.15.0-2_amd64.deb \
+RUN curl -s -S -L \
+         http://http.us.debian.org/debian/pool/main/libi/libisal/libisal2_2.15.0-2_amd64.deb \
          -o /opt/libisal2_2.15.0-2_amd64.deb && \
     dpkg -i /opt/libisal2_2.15.0-2_amd64.deb
 
-
 #######
 # 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
@@ -100,15 +107,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 update
-RUN apt-get install -y bats
+RUN apt-get -q update
+RUN apt-get -q install --no-install-recommends -y bats
+
+####
+# Install pylint
+####
+RUN pip install pylint
 
 ###
 # Avoid out of memory errors in builds
@@ -125,7 +142,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