Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM eclipse-temurin AS builder
ARG LIBWEBP=libwebp-1.4.0-linux-x86-64
RUN curl -s -L https://storage.googleapis.com/downloads.webmproject.org/releases/webp/${LIBWEBP}.tar.gz | \
tar -xvzf - -C /tmp --one-top-level=libwebp --strip-components=1
WORKDIR /app
COPY settings.gradle build.gradle gradlew ./
COPY gradle ./gradle
Expand All @@ -10,6 +13,8 @@ RUN ./gradlew runtime --no-daemon
FROM gcr.io/distroless/base-nossl:nonroot AS bot
COPY --from=builder /app/build/jre ./jre
COPY --from=builder /app/build/libs/Stickerify-shadow.jar .
COPY --from=builder /tmp/libwebp/bin/cwebp /usr/local/bin/
COPY --from=builder /tmp/libwebp/bin/dwebp /usr/local/bin/
COPY --from=mwader/static-ffmpeg /ffmpeg /usr/local/bin/
ENV FFMPEG_PATH=/usr/local/bin/ffmpeg
CMD ["jre/bin/java", "-jar", "Stickerify-shadow.jar"]
CMD ["jre/bin/java", "-Dcom.sksamuel.scrimage.webp.binary.dir=/usr/local/bin/", "-jar", "Stickerify-shadow.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private static boolean isAnimatedStickerCompliant(File file, String mimeType) th

try (var gzipInputStream = new GZIPInputStream(new FileInputStream(file))) {
uncompressedContent = new String(gzipInputStream.readAllBytes(), UTF_8);
} catch (IOException e) {
} catch (IOException _) {
LOGGER.atError().log("Unable to retrieve gzip content from file {}", file.getName());
}

Expand Down Expand Up @@ -192,7 +192,7 @@ private static ImmutableImage toImage(File file) throws FileOperationException {

try {
return ImmutableImage.loader().fromFile(file);
} catch (IOException e) {
} catch (IOException _) {
return null;
}
}
Expand Down