Fix preferences docker-verify pipeline step 55/135555/2
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 25 Jul 2023 11:29:36 +0000 (11:29 +0000)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 25 Jul 2023 12:09:50 +0000 (12:09 +0000)
Issue-ID: PORTALNG-27
Change-Id: Ifbea43e6f7e44f600b6756e2c47b6e07a0a081ba
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
.dockerignore
Dockerfile

index c8de995..e69de29 100644 (file)
@@ -1,4 +0,0 @@
-# Ignore everything
-*
-# ... but the build jar
-!/app/build/libs
\ No newline at end of file
index 08ba08e..45036bb 100644 (file)
@@ -1,5 +1,10 @@
-FROM onap-repo/openjdk:17
-ARG JAR_FILE=/app/build/libs/app-*.jar
-COPY ${JAR_FILE} app.jar
+FROM eclipse-temurin:17 as builder
+COPY . ./preferences
+WORKDIR /preferences
+RUN ./gradlew assemble
+
+FROM eclipse-temurin:17-jre-alpine
+ARG JAR_FILE=/preferences/app/build/libs/app-*.jar
+COPY --from=builder ${JAR_FILE} app.jar
 EXPOSE 9080
 ENTRYPOINT [ "java","-jar","app.jar" ]
\ No newline at end of file