Skip to content

Commit

Permalink
Merge pull request #20 from JonasFranke/devGradleBaseImg
Browse files Browse the repository at this point in the history
multistage Dockerfile
  • Loading branch information
JonasFranke authored Aug 11, 2023
2 parents 8365cba + e2330e7 commit 4979ebb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM gradle:jdk17-jammy
FROM gradle:jdk17-jammy AS build
WORKDIR /app
COPY build.gradle settings.gradle ./
COPY src ./src
RUN gradle shadowJar
ENTRYPOINT ["java", "-jar", "build/libs/ddsb-1.0-SNAPSHOT-all.jar"]
COPY . .
RUN gradle clean shadowJar

FROM eclipse-temurin:17-jammy

WORKDIR /app
RUN ls
COPY --from=build /app/build/libs/ddsb-*.jar bot.jar

ENTRYPOINT ["java", "-jar", "bot.jar"]

0 comments on commit 4979ebb

Please sign in to comment.