forked from big-data-europe/docker-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (21 loc) · 824 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
FROM bde2020/spark-submit:3.3.0-hadoop3.3
LABEL maintainer="Gezim Sejdiu <[email protected]>, Giannis Mouchakis <[email protected]>"
ARG SBT_VERSION
ENV SBT_VERSION=${SBT_VERSION:-1.6.2}
RUN wget -O - https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.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"]