From 29a4769e79e5ea83ed29303e22e7ce722de7ad26 Mon Sep 17 00:00:00 2001 From: Busra Arslan Date: Wed, 15 Nov 2023 14:33:32 +0100 Subject: [PATCH] dockerignore added and dockerfile simplified --- .dockerignore | 1 + Dockerfile | 26 ++++---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..610838fe --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +webui \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a29080bc..17ada64e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,29 +2,11 @@ FROM maven:3.8.5-openjdk-17-slim as builder WORKDIR /build -COPY core core -RUN mvn install -DskipTests -f core - - -COPY booking booking -RUN mvn install -DskipTests -f booking - - -COPY ebl-issuance ebl-issuance -RUN mvn install -DskipTests -f ebl-issuance - - -COPY ebl-surrender ebl-surrender -RUN mvn install -DskipTests -f ebl-surrender - - -COPY sandbox sandbox -RUN mvn install -DskipTests -f sandbox - - -COPY spring-boot spring-boot -RUN mvn install -DskipTests -f spring-boot +COPY . . +RUN for pom in core booking ebl-issuance ebl-surrender sandbox spring-boot; do \ + mvn install -U -B -DskipTests -f "$pom/pom.xml" || exit 1; \ + done FROM openjdk:17-alpine3.14