From 0c6dd3ed9794afac87b43bb89f8e9a45c99fad58 Mon Sep 17 00:00:00 2001 From: adkumar1 Date: Fri, 24 May 2024 14:46:10 +0530 Subject: [PATCH 1/4] Updated legal distribution information --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3a1528ed..d43f7841 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,9 @@ USER $USERNAME WORKDIR /autosetup +# Copy Legal information for distributions, the star ones are copied by workflow +COPY LICENSE NOTICE.md DEPENDENCIES SECURITY.md ./ + # copy over the built artifact from the maven image COPY --from=builder target/*.jar ./app.jar From 0f28911ccad977725c26a41b8f10f8f6a29ca7dc Mon Sep 17 00:00:00 2001 From: adkumar1 Date: Fri, 24 May 2024 20:25:32 +0530 Subject: [PATCH 2/4] copy legal files --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d43f7841..e6b017cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,11 +54,12 @@ USER $USERNAME WORKDIR /autosetup -# Copy Legal information for distributions, the star ones are copied by workflow -COPY LICENSE NOTICE.md DEPENDENCIES SECURITY.md ./ +# Copy Legal information for distributions +COPY LICENSE NOTICE.md DEPENDENCIES SECURITY.md /app/legal/ # copy over the built artifact from the maven image COPY --from=builder target/*.jar ./app.jar +COPY --from=builder /app/legal/* /autosetup EXPOSE 9999 # set the startup command to run your binary From 2493337b832e94e6b5498e9eb72e1959e1d19229 Mon Sep 17 00:00:00 2001 From: adkumar1 Date: Fri, 24 May 2024 20:26:31 +0530 Subject: [PATCH 3/4] create base dir --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index e6b017cd..ff07d5dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,8 @@ # our base build image FROM maven:3.8.7-eclipse-temurin-17 AS builder +RUN mkdir -p /app/legal + # copy the project files COPY ./pom.xml /pom.xml From 5ea13abf0fd1bb2efe92571ac39e4580b6b10697 Mon Sep 17 00:00:00 2001 From: adkumar1 Date: Mon, 27 May 2024 16:11:19 +0530 Subject: [PATCH 4/4] Updated files --- Dockerfile | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff07d5dc..45f07a3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,19 +21,16 @@ # our base build image FROM maven:3.8.7-eclipse-temurin-17 AS builder -RUN mkdir -p /app/legal - # copy the project files -COPY ./pom.xml /pom.xml +COPY . /autosetup/ + +WORKDIR /autosetup # build all dependencies RUN mvn dependency:go-offline -B -# copy your other files -COPY ./src ./src - # build for release -RUN mvn clean install -Dmaven.test.skip=true +RUN mvn clean install -Dmaven.test.skip=true FROM eclipse-temurin:17.0.11_9-jdk @@ -52,16 +49,12 @@ RUN adduser \ --uid "$UID" \ "$USER" -USER $USERNAME - -WORKDIR /autosetup +USER $USER -# Copy Legal information for distributions -COPY LICENSE NOTICE.md DEPENDENCIES SECURITY.md /app/legal/ +WORKDIR / # copy over the built artifact from the maven image -COPY --from=builder target/*.jar ./app.jar -COPY --from=builder /app/legal/* /autosetup +COPY --from=builder /autosetup/target/*.jar ./app.jar EXPOSE 9999 # set the startup command to run your binary