From df99ed495ca55b18117aafefb62cb7a0e3cdf4af Mon Sep 17 00:00:00 2001 From: sh <37271604+shumvgolove@users.noreply.github.com> Date: Tue, 15 Apr 2025 09:02:50 +0000 Subject: [PATCH] ci/docker: use Java Corretto (#5832) --- Dockerfile.build | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile.build b/Dockerfile.build index cd0fd22aad..76bb1127f2 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -11,7 +11,7 @@ ARG JAVA=17 ENV TZ=Etc/UTC \ DEBIAN_FRONTEND=noninteractive -# Install curl, git and and simplexmq dependencies +# Install curl, git and and simplex-chat dependencies RUN apt-get update && \ apt-get install -y curl \ libpq-dev \ @@ -27,7 +27,6 @@ RUN apt-get update && \ libnuma-dev \ libssl-dev \ desktop-file-utils \ - openjdk-${JAVA}-jdk-headless \ patchelf \ ca-certificates \ zip \ @@ -37,9 +36,18 @@ RUN apt-get update && \ appstream \ gpg \ unzip &&\ - export JAVA_HOME=$(update-java-alternatives -l | head -n 1 | awk -F ' ' '{print $NF}') &&\ 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 ENV BOOTSTRAP_HASKELL_GHC_VERSION=${GHC} ENV BOOTSTRAP_HASKELL_CABAL_VERSION=${CABAL}