forked from big-data-europe/docker-spark
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (22 loc) · 781 Bytes
/
Dockerfile
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
FROM bde2020/spark-submit:2.4.0-hadoop2.7
MAINTAINER Cecile Tonglet <cecile.tonglet@tenforce.com>
MAINTAINER Gezim Sejdiu <g.sejdiu@gmail.com>
ARG SBT_VERSION
ENV SBT_VERSION=${SBT_VERSION:-1.2.6}
RUN wget -O - https://piccolo.link/sbt-1.2.6.tgz | gunzip | tar -x -C /usr/local
ENV PATH /usr/local/sbt/bin:${PATH}
WORKDIR /app
# Pre-install base libraries
ADD build.sbt /app/
ADD plugins.sbt /app/project/
RUN sbt update
COPY template.sh /
ENV SPARK_APPLICATION_MAIN_CLASS Application
# Copy the build.sbt first, for separate dependency resolving and downloading
ONBUILD COPY build.sbt /app/
ONBUILD COPY project /app/project
ONBUILD RUN sbt update
# Copy the source code and build the application
ONBUILD COPY . /app
ONBUILD RUN sbt clean assembly
CMD ["/template.sh"]