-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile.spark
36 lines (26 loc) · 918 Bytes
/
Dockerfile.spark
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM openjdk:8u131-jre-alpine
MAINTAINER <Sparks Li>
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV TZ=Asia/Shanghai
RUN apk --update add curl unzip bash tzdata \
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone
# SPARK
ENV SPARK_VERSION 2.2.0
ENV SPARK_PACKAGE spark-${SPARK_VERSION}-bin-hadoop2.7
ENV SPARK_HOME /usr/spark-${SPARK_VERSION}
# ENV CLASS_PATH $CLASS_PATH:${SPARK_HOME}/jars
ENV PATH $PATH:${SPARK_HOME}/bin
# ENV SPARK_HISTORY_HOME=/root/spark/history
RUN curl -sL --retry 3 \
"http://d3kbcqa49mib13.cloudfront.net/${SPARK_PACKAGE}.tgz" \
| gunzip \
| tar x -C /usr/ \
&& mv /usr/$SPARK_PACKAGE $SPARK_HOME \
&& chown -R root:root $SPARK_HOME \
# && mkdir -p $SPARK_HISTORY_HOME
# ADD spark-defaults.conf $SPARK_HOME/conf/spark-defaults.conf
WORKDIR $SPARK_HOME
CMD ["bin/spark-class", "org.apache.spark.deploy.master.Master"]