ci/docker: use Java Corretto (#5832)

This commit is contained in:
sh 2025-04-15 09:02:50 +00:00 committed by GitHub
parent 45e395d35a
commit df99ed495c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ ARG JAVA=17
ENV TZ=Etc/UTC \ ENV TZ=Etc/UTC \
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
# Install curl, git and and simplexmq dependencies # Install curl, git and and simplex-chat dependencies
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y curl \ apt-get install -y curl \
libpq-dev \ libpq-dev \
@ -27,7 +27,6 @@ RUN apt-get update && \
libnuma-dev \ libnuma-dev \
libssl-dev \ libssl-dev \
desktop-file-utils \ desktop-file-utils \
openjdk-${JAVA}-jdk-headless \
patchelf \ patchelf \
ca-certificates \ ca-certificates \
zip \ zip \
@ -37,9 +36,18 @@ RUN apt-get update && \
appstream \ appstream \
gpg \ gpg \
unzip &&\ unzip &&\
export JAVA_HOME=$(update-java-alternatives -l | head -n 1 | awk -F ' ' '{print $NF}') &&\
ln -s /bin/fusermount /bin/fusermount3 || : ln -s /bin/fusermount /bin/fusermount3 || :
# Install Java Coretto
# Required, because official Java in Ubuntu
# depends on libjpeg.so.8 and liblcms2.so.2 which are NOT copied into final
# /usr/lib/runtime/lib directory and I do not have time to figure out gradle.kotlin
# to fix this :(
RUN curl --proto '=https' --tlsv1.2 -sSf 'https://apt.corretto.aws/corretto.key' | gpg --dearmor -o /usr/share/keyrings/corretto-keyring.gpg &&\
echo "deb [signed-by=/usr/share/keyrings/corretto-keyring.gpg] https://apt.corretto.aws stable main" > /etc/apt/sources.list.d/corretto.list &&\
apt update &&\
apt install -y java-${JAVA}-amazon-corretto-jdk
# Specify bootstrap Haskell versions # Specify bootstrap Haskell versions
ENV BOOTSTRAP_HASKELL_GHC_VERSION=${GHC} ENV BOOTSTRAP_HASKELL_GHC_VERSION=${GHC}
ENV BOOTSTRAP_HASKELL_CABAL_VERSION=${CABAL} ENV BOOTSTRAP_HASKELL_CABAL_VERSION=${CABAL}