-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
20 lines (19 loc) · 946 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
RUN --mount=type=cache,target=/home/gradle/.gradle/caches \
./gradlew dependencies --no-daemon
COPY . .
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", "-Dcom.sksamuel.scrimage.webp.binary.dir=/usr/local/bin/", "-jar", "Stickerify-shadow.jar"]