From feb1dd8203ee629257ee52600cb1c9b0f7d82d77 Mon Sep 17 00:00:00 2001 From: Timo Salm <accounts@timosalm.de> Date: Fri, 8 Nov 2024 09:17:26 +0100 Subject: [PATCH] Improvements --- leyden/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/leyden/Dockerfile b/leyden/Dockerfile index e197539..230f105 100644 --- a/leyden/Dockerfile +++ b/leyden/Dockerfile @@ -8,15 +8,15 @@ RUN apt-get update && apt-get install -y wget tar && rm -rf /var/lib/apt/lists/* RUN mkdir -p "$JAVA_HOME" && wget -qO- "$JDK_URL" | tar -xz --strip-components=1 -C "$JAVA_HOME" -RUN mkdir tmp -COPY ./build.gradle ./gradlew ./settings.gradle tmp/ -COPY ./gradle tmp/gradle -COPY ./src tmp/src -RUN ./tmp/gradlew assemble +RUN mkdir -p build +COPY ./build.gradle ./gradlew ./settings.gradle build/ +COPY ./gradle build/gradle +COPY ./src build/src +RUN ./build/gradlew assemble -COPY ./leyden/unpack-executable-jar.sh tmp/ -RUN ./tmp/unpack-executable-jar.sh -d build-unpacked tmp/build/libs/hello-world-0.0.1-SNAPSHOT.jar -RUN rm -rf tmp +COPY ./leyden/unpack-executable-jar.sh ./unpack-executable-jar.sh +RUN ./unpack-executable-jar.sh -d build-unpacked build/build/libs/hello-world-0.0.1-SNAPSHOT.jar +RUN rm -rf build unpack-executable-jar.sh RUN java -Dspring.aot.enabled=true -Dspring.context.exit=onRefresh -XX:CacheDataStore=build-unpacked/application.cds -jar build-unpacked/run-app.jar CMD ["java", "-Dspring.aot.enabled=true", "-XX:CacheDataStore=build-unpacked/application.cds", "-jar", "build-unpacked/run-app.jar"]