Skip to content

Commit

Permalink
Optimize Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
MaVdbussche committed Aug 16, 2024
1 parent 61a6982 commit 9c846eb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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", "--status"]
RUN gradle init && gradle :jar

FROM azul/zulu-openjdk-alpine:21-latest

Expand All @@ -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"]

0 comments on commit 9c846eb

Please sign in to comment.