From 58a18ad85d05332502a0b3874a2b1515445ea58a Mon Sep 17 00:00:00 2001 From: Barasingha Date: Fri, 16 Aug 2024 21:15:21 +0200 Subject: [PATCH] Fix Gradle daemon not being reused (#24) --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd7be3c..55a7496 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,10 @@ # (using this Gradle Wrapper version) remains aligned with the production Dockerfile (using vanilla Gradle) FROM gradle:8.7-alpine AS build -RUN ["gradle", "init"] COPY ./app /app - WORKDIR /app -RUN ["gradle", "jar"] +RUN gradle init && gradle :jar FROM azul/zulu-openjdk-alpine:21-latest @@ -18,7 +16,6 @@ ENV UPDATE_WINDOW_SECONDS="45" ENV LOG_LEVEL="INFO" WORKDIR /app - COPY --from=build /app/build/libs/*.jar app.jar ENTRYPOINT ["java", "-jar", "app.jar"]