forked from big-data-europe/docker-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 785 Bytes
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
FROM bde2020/spark-submit:3.3.0-hadoop3.3
LABEL maintainer="Gezim Sejdiu <g.sejdiu@gmail.com>, Giannis Mouchakis <gmouchakis@gmail.com>"
ENV SPARK_APPLICATION_JAR_NAME application-1.0
ENV SPARK_APPLICATION_JAR_LOCATION /app/application.jar
COPY template.sh /
RUN apk add --no-cache openjdk8 maven\
&& chmod +x /template.sh \
&& mkdir -p /app \
&& mkdir -p /usr/src/app
# Copy the POM-file first, for separate dependency resolving and downloading
ONBUILD COPY pom.xml /usr/src/app
ONBUILD RUN cd /usr/src/app \
&& mvn dependency:resolve
ONBUILD RUN cd /usr/src/app \
&& mvn verify
# Copy the source code and build the application
ONBUILD COPY . /usr/src/app
ONBUILD RUN cd /usr/src/app \
&& mvn clean package
CMD ["/bin/bash", "/template.sh"]