From f4d6e1d41bc26b8af7b41330bbc67cfe6d0634a7 Mon Sep 17 00:00:00 2001 From: Sami Ekblad Date: Fri, 17 May 2024 08:44:36 +0300 Subject: [PATCH] Clean up Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19d5ba5..40127d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,14 +7,14 @@ RUN microdnf update -y && \ WORKDIR /usr/src/app -# Copy rest of the dependencies. +# Copy rest of the dependencies from pom.xml. COPY pom.xml . RUN mvn dependency:go-offline # Copy the source code COPY . . -## Do the build +# Do the build using production profile RUN mvn clean install -Pproduction # Second stage: Lightweight jdk-slim image @@ -29,7 +29,7 @@ USER appuser WORKDIR /app # Copy the native binary from the build stage -COPY --from=build /usr/src/app/target/idle-demo-*.jar /app/app.jar +COPY --from=build /usr/src/app/target/*.jar /app/app.jar # Run the application EXPOSE 8080