forked from ie3-institute/simona
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (19 loc) · 783 Bytes
/
Dockerfile
File metadata and controls
25 lines (19 loc) · 783 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
FROM openjdk:17-slim
# USAGE:
# build with ARG version and if applicable with ARG snapshot suffix
# e.g.: docker build --build-arg version=2.1.0 --build-arg snapshotSuffix=-SNAPSHOT -t simona .
# run by mounting directory
# e.g. docker run -v `realpath input`:/input --rm simona
# note: this does not work for windows so you have to enter the absolute path manually and escape the \'s
ARG version
# snapshot suffix for jar files is "-SNAPSHOT"
ARG snapshotSuffix=""
ENV jarFile="simona-${version}${snapshotSuffix}-all.jar"
ENV config=""
RUN mkdir exec \
&& mkdir input
# copy simona fat jar into container
COPY build/libs/$jarFile /exec/
# inputData is mounted upon running
VOLUME /input
ENTRYPOINT ["sh", "-c", "java -jar exec/${jarFile} --config=${config}"]