Skip to content

Commit f34869d

Browse files
committed
remove unneeded binary from docker image, remove compression option from custom jre
1 parent 69cb055 commit f34869d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ RUN curl -L --fail --retry 3 --retry-delay 5 "$LIBWEBP_URL" -o libwebp.tar.gz &&
1212
tar -xzf libwebp.tar.gz --one-top-level=libwebp --strip-components=1
1313
COPY settings.gradle build.gradle gradlew ./
1414
COPY gradle ./gradle
15-
RUN --mount=type=cache,target=/home/gradle/.gradle/caches \
16-
./gradlew dependencies --no-daemon
15+
RUN --mount=type=cache,target=/home/gradle/.gradle/caches ./gradlew dependencies --no-daemon
1716
COPY . .
1817
RUN ./gradlew runtime --no-daemon
1918

@@ -25,9 +24,8 @@ ENV FFMPEG_PATH=/usr/local/bin/ffmpeg
2524

2625
COPY --from=builder /app/libwebp/bin/cwebp /usr/local/bin/
2726
COPY --from=builder /app/libwebp/bin/dwebp /usr/local/bin/
28-
COPY --from=builder /app/libwebp/bin/gif2webp /usr/local/bin/
2927

3028
COPY --from=builder /app/build/jre jre
31-
COPY --from=builder /app/build/libs/Stickerify-*-all.jar Stickerify.jar
29+
COPY --from=builder /app/build/libs/Stickerify-1.0-all.jar Stickerify.jar
3230

3331
CMD ["jre/bin/java", "-XX:+UseZGC", "-Dcom.sksamuel.scrimage.webp.binary.dir=/usr/local/bin/", "-jar", "Stickerify.jar"]

build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ tasks.withType(JavaCompile).configureEach {
5454

5555
test {
5656
dependsOn jre
57-
inputs.files jre.outputs.files
5857

5958
def file = DefaultNativePlatform.currentOperatingSystem.isWindows() ? 'java.exe' : 'java'
6059
executable = layout.buildDirectory.file('jre/bin/' + file).get()
@@ -94,7 +93,7 @@ shadowJar {
9493
}
9594

9695
runtime {
97-
options = ['--compress', 'zip-9', '--no-header-files', '--no-man-pages', '--strip-debug']
96+
options = ['--strip-debug', '--no-header-files', '--no-man-pages']
9897
modules = [ 'java.desktop', 'java.instrument', 'java.naming', 'java.sql', 'jdk.crypto.ec', 'jdk.unsupported']
9998
}
10099

0 commit comments

Comments
 (0)