Skip to content

Commit 47b7762

Browse files
Switch to Azul JDK and Alpine as base image
1 parent dc6e67b commit 47b7762

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.github/workflows/unit-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Setup Java
3333
uses: actions/setup-java@v4
3434
with:
35-
distribution: temurin
35+
distribution: zulu
3636
java-version: 24
3737

3838
- name: Setup project and upload dependency graph

Dockerfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
FROM eclipse-temurin:24-alpine AS builder
1+
FROM azul/zulu-openjdk-alpine:24 AS builder
22

33
# bump: libwebp /LIBWEBP_VERSION=([\d.]+)/ git:https://chromium.googlesource.com/webm/libwebp.git|^1
44
# bump: libwebp after ./hashupdate Dockerfile LIBWEBP $LATEST
55
ARG LIBWEBP_VERSION=1.5.0
6-
ARG LIBWEBP_URL="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP_VERSION-linux-x86-64.tar.gz"
76
ARG LIBWEBP_SHA256=f4bf49f85991f50e86a5404d16f15b72a053bb66768ed5cc0f6d042277cc2bb8
7+
ARG LIBWEBP_FILE="libwebp-$LIBWEBP_VERSION-linux-x86-64.tar.gz"
8+
ARG LIBWEBP_URL="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/$LIBWEBP_FILE"
89

910
WORKDIR /app
10-
RUN apk --no-cache add curl tar && \
11-
curl -L --fail --retry 3 --retry-delay 5 "$LIBWEBP_URL" -o libwebp.tar.gz && \
12-
echo "$LIBWEBP_SHA256 libwebp.tar.gz" | sha256sum -c - && \
13-
tar -xzf libwebp.tar.gz --one-top-level=libwebp --strip-components=1
11+
RUN apk --no-cache add binutils curl tar
12+
RUN curl -L --fail --retry 3 --retry-delay 5 "$LIBWEBP_URL" -O && \
13+
echo "$LIBWEBP_SHA256 $LIBWEBP_FILE" | sha256sum -c - && \
14+
tar -xzf "$LIBWEBP_FILE" --one-top-level=libwebp --strip-components=1 && \
15+
rm "$LIBWEBP_FILE"
16+
17+
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false"
1418
COPY settings.gradle build.gradle gradlew ./
1519
COPY gradle ./gradle
16-
RUN --mount=type=cache,target=/home/gradle/.gradle/caches ./gradlew dependencies --no-daemon
20+
RUN --mount=type=cache,target=/home/gradle/.gradle/caches ./gradlew dependencies
1721
COPY . .
18-
RUN ./gradlew runtime --no-daemon
22+
RUN ./gradlew runtime
1923

20-
FROM gcr.io/distroless/base-nossl:nonroot AS bot
24+
FROM alpine AS bot
2125

2226
# bump: ffmpeg /static-ffmpeg:([\d.]+)/ docker:mwader/static-ffmpeg|~7.0
2327
COPY --from=mwader/static-ffmpeg:7.0.2 /ffmpeg /usr/local/bin/

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ description = 'Telegram bot to convert medias in the format required to be used
4545
java {
4646
toolchain {
4747
languageVersion = JavaLanguageVersion.of(24)
48+
vendor = JvmVendorSpec.AZUL
4849
}
4950
}
5051

@@ -67,7 +68,7 @@ jacocoTestReport {
6768
reports {
6869
html.required = false
6970
xml.required = true
70-
xml.outputLocation = file(".qodana/code-coverage/report.xml")
71+
xml.outputLocation = file('.qodana/code-coverage/report.xml')
7172
}
7273

7374
afterEvaluate {
@@ -94,7 +95,7 @@ shadowJar {
9495
}
9596

9697
runtime {
97-
options = ['--strip-debug', '--no-header-files', '--no-man-pages']
98+
options = ['--strip-debug', '--no-header-files', '--no-man-pages', '--compress', 'zip-9']
9899
modules = ['java.desktop', 'java.instrument', 'java.naming', 'java.sql', 'jdk.crypto.ec', 'jdk.unsupported']
99100
}
100101

qodana.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ include:
55
- name: VulnerableLibrariesGlobal
66
# bump: qodana /qodana-jvm:([\d.]+)/ docker:jetbrains/qodana-jvm|/^[\d]{4}\.\d+$/|sort
77
linter: jetbrains/qodana-jvm:2025.1
8-
projectJDK: temurin-24
8+
projectJDK: zulu-24

0 commit comments

Comments
 (0)