aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-04-14 11:44:19 +0000
commitcdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (patch)
tree41ac6c0e7a52505fd1d0de057df6d5328a853cd0 /Dockerfile
parent1a9b563662e9a9dd1f89e04ce0026e2cc5c4771d (diff)
Upload bff
Issue-ID: PORTAL-1083 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I50f0a2db2dab28354c32c1ebf5a5e22afb0faade
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..3e2f704
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,23 @@
+FROM openjdk:17 as builder
+COPY . ./portalbff
+WORKDIR /portalbff
+
+# assemble does not run tests (as opposed to build)
+RUN ./gradlew assemble
+
+# Run locally (docker build --target=prod -t <tag> .)
+FROM openjdk:17 as prod
+ARG JAR_FILE=/portalbff/app/build/libs/app.jar
+COPY --from=builder ${JAR_FILE} app.jar
+EXPOSE 9080
+ENTRYPOINT [ "java","-jar","app.jar" ]
+
+# Run in pipeline (docker build --target=pipeline -t <tag> .)
+FROM openjdk:17 as pipeline
+WORKDIR /app
+
+ARG JAR_FILE=app/build/libs/app.jar
+COPY ${JAR_FILE} app.jar
+
+ENTRYPOINT [ "java","-jar","app.jar" ]
+EXPOSE 9080 \ No newline at end of file