build(docker): use ubuntu 24.10 and JDK 23

This commit is contained in:
Gauthier Roebroeck 2024-12-13 11:23:58 +08:00
parent b682e35713
commit 858365f4c9

View File

@ -4,25 +4,18 @@ WORKDIR /builder
COPY assembly/${JAR} application.jar
RUN java -Djarmode=tools -jar application.jar extract --layers --destination extracted
# amd64 builder: uses ubuntu:22.04, as libjxl is not available on more recent versions
FROM ubuntu:22.04 as build-amd64
# amd64 builder
FROM ubuntu:24.10 as build-amd64
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:21-jre $JAVA_HOME $JAVA_HOME
COPY --from=eclipse-temurin:23-jre $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"
RUN apt -y update && \
apt -y install ca-certificates locales software-properties-common wget libwebp-dev libarchive-dev && \
apt -y install ca-certificates locales libjxl-dev libheif-dev libwebp-dev libarchive-dev wget curl && \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
add-apt-repository -y ppa:strukturag/libheif && \
add-apt-repository -y ppa:strukturag/libde265 && \
apt -y update && apt install -y libheif-dev && \
wget "https://github.com/libjxl/libjxl/releases/download/v0.8.2/jxl-debs-amd64-ubuntu-22.04-v0.8.2.tar.gz" && \
tar -xzf jxl-debs-amd64-ubuntu-22.04-v0.8.2.tar.gz && \
apt -y install ./jxl_0.8.2_amd64.deb ./libjxl_0.8.2_amd64.deb ./libjxl-dev_0.8.2_amd64.deb && \
wget "https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit" -O /usr/bin/kepubify && \
chmod +x /usr/bin/kepubify && \
rm *.deb && rm *.ddeb && rm jxl-debs-amd64-ubuntu-22.04-v0.8.2.tar.gz && \
apt -y remove wget software-properties-common && apt -y autoremove && rm -rf /var/lib/apt/lists/*
apt -y autoremove && rm -rf /var/lib/apt/lists/*
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/x86_64-linux-gnu"
# arm64 builder