Last active
September 23, 2018 17:26
-
-
Save mvillarrealb/ed62d732a04eecd0b1dec9cda0b4b7b4 to your computer and use it in GitHub Desktop.
A base image based on java:alpine-jdk-8 wich ships scala, python3 and spark 2.3.1
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
FROM java:8-jdk-alpine | |
ENV DAEMON_RUN=true | |
ENV SPARK_VERSION=2.3.1 | |
ENV HADOOP_VERSION=2.7 | |
ENV SCALA_VERSION=2.12.4 | |
ENV SCALA_HOME=/usr/share/scala | |
RUN apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \ | |
apk add --no-cache bash curl jq && \ | |
cd "/tmp" && \ | |
wget --no-verbose "https://downloads.typesafe.com/scala/${SCALA_VERSION}/scala-${SCALA_VERSION}.tgz" && \ | |
tar xzf "scala-${SCALA_VERSION}.tgz" && \ | |
mkdir "${SCALA_HOME}" && \ | |
rm "/tmp/scala-${SCALA_VERSION}/bin/"*.bat && \ | |
mv "/tmp/scala-${SCALA_VERSION}/bin" "/tmp/scala-${SCALA_VERSION}/lib" "${SCALA_HOME}" && \ | |
ln -s "${SCALA_HOME}/bin/"* "/usr/bin/" && \ | |
apk del .build-dependencies && \ | |
rm -rf "/tmp/"* | |
#Scala instalation | |
RUN export PATH="/usr/local/sbt/bin:$PATH" && apk update && apk add ca-certificates wget tar && mkdir -p "/usr/local/sbt" && wget -qO - --no-check-certificate "https://cocl.us/sbt-0.13.16.tgz" | tar xz -C /usr/local/sbt --strip-components=1 && sbt sbtVersion | |
RUN apk add --no-cache python3 | |
RUN wget --no-verbose http://apache.mirror.iphh.net/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz && tar -xvzf spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz \ | |
&& mv spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION} spark \ | |
&& rm spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment