Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
timosalm committed Nov 8, 2024
1 parent 2f52422 commit feb1dd8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions leyden/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit feb1dd8

Please sign in to comment.