-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use jlink to create a smaller docker image (#170)
- Loading branch information
1 parent
d7ec922
commit b71acc8
Showing
6 changed files
with
21 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
build/ | ||
src/test/ | ||
src/main/resources/images/ | ||
.gitattributes | ||
.gitignore | ||
*.md | ||
gradlew.bat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
FROM eclipse-temurin:21-jdk AS builder | ||
FROM eclipse-temurin AS builder | ||
WORKDIR /app | ||
COPY settings.gradle build.gradle gradlew ./ | ||
COPY gradle ./gradle | ||
RUN --mount=type=cache,target=/home/gradle/.gradle/caches \ | ||
./gradlew dependencies --no-daemon | ||
COPY . . | ||
RUN ./gradlew shadowJar --no-daemon | ||
RUN ./gradlew runtime --no-daemon | ||
|
||
FROM eclipse-temurin:21-jre-alpine AS bot | ||
WORKDIR /app | ||
FROM gcr.io/distroless/base-nossl AS bot | ||
COPY --from=builder /app/build/jre ./jre | ||
COPY --from=builder /app/build/libs/Stickerify-shadow.jar . | ||
COPY --from=mwader/static-ffmpeg:6.0 /ffmpeg /usr/local/bin/ | ||
COPY --from=mwader/static-ffmpeg /ffmpeg /usr/local/bin/ | ||
ENV FFMPEG_PATH=/usr/local/bin/ffmpeg | ||
CMD ["java", "-jar", "Stickerify-shadow.jar"] | ||
CMD ["jre/bin/java", "-jar", "Stickerify-shadow.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters