diff --git a/base/Dockerfile b/base/Dockerfile index c1c716c5..fe25d725 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -3,17 +3,23 @@ FROM debian:9 MAINTAINER Ivan Ermilov MAINTAINER Giannis Mouchakis -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openjdk-8-jdk +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openjdk-8-jdk \ + net-tools \ + curl \ + netcat \ + gnupg \ + && rm -rf /var/lib/apt/lists/* + ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends net-tools curl netcat gnupg - RUN curl -O https://dist.apache.org/repos/dist/release/hadoop/common/KEYS RUN gpg --import KEYS ENV HADOOP_VERSION 3.1.1 ENV HADOOP_URL https://www.apache.org/dist/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz + RUN set -x \ && curl -fSL "$HADOOP_URL" -o /tmp/hadoop.tar.gz \ && curl -fSL "$HADOOP_URL.asc" -o /tmp/hadoop.tar.gz.asc \ @@ -22,6 +28,7 @@ RUN set -x \ && rm /tmp/hadoop.tar.gz* RUN ln -s /opt/hadoop-$HADOOP_VERSION/etc/hadoop /etc/hadoop + RUN mkdir /opt/hadoop-$HADOOP_VERSION/logs RUN mkdir /hadoop-data @@ -29,11 +36,11 @@ RUN mkdir /hadoop-data ENV HADOOP_PREFIX=/opt/hadoop-$HADOOP_VERSION ENV HADOOP_CONF_DIR=/etc/hadoop ENV MULTIHOMED_NETWORK=1 - ENV USER=root ENV PATH $HADOOP_PREFIX/bin/:$PATH ADD entrypoint.sh /entrypoint.sh + RUN chmod a+x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]