From bbb81c2bac45d7836759c2d019e46bf6cabacc53 Mon Sep 17 00:00:00 2001 From: Richard Kovacs Date: Thu, 14 May 2015 18:39:59 +0200 Subject: [PATCH] Move downloads to the beginning of the Dockerfile Hadoop configuration change much faster because doesn't need to download native support each time. --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc72e00..1272a8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,10 @@ RUN rm jdk-7u71-linux-x64.rpm ENV JAVA_HOME /usr/java/default ENV PATH $PATH:$JAVA_HOME/bin +# download native support +RUN mkdir -p /tmp/native +RUN curl -Ls http://dl.bintray.com/sequenceiq/sequenceiq-bin/hadoop-native-64-2.7.0.tar | tar -x -C /tmp/native + # hadoop RUN curl -s http://www.eu.apache.org/dist/hadoop/common/hadoop-2.7.0/hadoop-2.7.0.tar.gz | tar -xz -C /usr/local/ RUN cd /usr/local && ln -s ./hadoop-2.7.0 hadoop @@ -59,8 +63,8 @@ ADD yarn-site.xml $HADOOP_PREFIX/etc/hadoop/yarn-site.xml RUN $HADOOP_PREFIX/bin/hdfs namenode -format # fixing the libhadoop.so like a boss -RUN rm /usr/local/hadoop/lib/native/* -RUN curl -Ls http://dl.bintray.com/sequenceiq/sequenceiq-bin/hadoop-native-64-2.7.0.tar | tar -x -C /usr/local/hadoop/lib/native/ +RUN rm -rf /usr/local/hadoop/lib/native +RUN mv /tmp/native /usr/local/hadoop/lib ADD ssh_config /root/.ssh/config RUN chmod 600 /root/.ssh/config