forked from big-data-europe/docker-hadoop
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better apt instrunctions for reduced image size
- Loading branch information
Giannis Mouchakis
committed
May 7, 2019
1 parent
7aee872
commit 59ca5b2
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,23 @@ FROM debian:9 | |
MAINTAINER Ivan Ermilov <[email protected]> | ||
MAINTAINER Giannis Mouchakis <[email protected]> | ||
|
||
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,18 +28,19 @@ 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 | ||
|
||
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"] |