From 1a71736234b28cd9624f814229fde6de858c2bc4 Mon Sep 17 00:00:00 2001 From: lwih Date: Fri, 29 Dec 2023 12:12:31 +0100 Subject: [PATCH] Trivy - fix docker file --- infra/docker/app/DockerfileCI | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/infra/docker/app/DockerfileCI b/infra/docker/app/DockerfileCI index 13b3be02..8eefda09 100644 --- a/infra/docker/app/DockerfileCI +++ b/infra/docker/app/DockerfileCI @@ -18,8 +18,8 @@ RUN mvn dependency:go-offline -B # Stage 2: Build the application FROM maven:3.8.5-openjdk-17-slim as build-backend -ARG GITHUB_SHA -ARG VERSION +ARG GITHUB_SHA=NO_COMMIT +ARG VERSION=NO_VERSION WORKDIR /tmp/backend COPY backend/ /tmp/backend @@ -74,7 +74,7 @@ ENV ENV_DB_URL="" COPY --from=build-backend /tmp/backend/target/rapportnav-${VERSION}.jar /home/rapportnav COPY infra/configurations/backend /home/rapportnav/configurations/ - +# copy frontend related things RUN mkdir /home/rapportnav/public # COPY --from=buildSourcemaps /tmp/frontend/build /home/rapportnav/public/ COPY --from=build-frontend /tmp/frontend/dist /home/rapportnav/public/ @@ -87,6 +87,5 @@ RUN mkdir /home/rapportnav/logs # It must point to the front (React) files ENV STATIC_FILES_PATH=/home/rapportnav/public - # CMD exec java -jar "/home/rapportnav/rapportnav-${VERSION}.jar" CMD exec java -Dspring.config.additional-location="/home/rapportnav/configurations/" -Dspring.profiles.active=$ENV_PROFILE -jar "/home/rapportnav/rapportnav-${VERSION}.jar"