-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install OpenJDK 21 in ATH image #1321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fails to build on arm64:
➜ acceptance-test-harness git:(openjdk21) docker build -t ath src/main/resources/ath-container
[+] Building 55.2s (9/27)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 6.47kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 0.0s
=> [ 1/23] FROM docker.io/library/ubuntu:22.04 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 3.92kB 0.0s
=> [ 2/23] RUN apt-get update && apt-get install -y --no-install-recommends gpg-agent software-properties-common && apt-get clean all && rm -rf /var/cache/apt 15.0s
=> [ 3/23] RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends ca-certificates gnupg lsb-release 30.9s
=> [ 4/23] RUN curl -sSLo /tmp/jdk21.tar.gz "https://github.com/adoptium/temurin21-binaries/releases/download/jdk21-${JDK21_VERSION}/OpenJDK21U-jdk_x64_linux_hotspot_${JDK21_VERSION//-beta/}.tar 9.0s
=> ERROR [ 5/23] RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 21 && update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21- 0.2s
------
> [ 5/23] RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 21 && update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 21 && update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java && update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac:
#8 0.171 update-alternatives: error: alternative /usr/lib/jvm/java-17-openjdk-amd64/bin/java for java not registered; not setting
------
executor failed running [/bin/bash -o pipefail -c update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 21 && update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 21 && update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java && update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac]: exit code: 2
Just a few lines below, there is this:
If ARM64 was supported, that line would not exist. |
Right broken in #1043.
I guess this makes it very explicit that it was broken, it still built before. |
Prerequisite for #1320. Without changing the existing configuration (Java 17 as default, Java 11 available), add OpenJDK 21 to the image.
Testing done
Verified OpenJDK 17 was still the default. Verified I could switch to OpenJDK 21 with
set-java.sh
and ranjava -version
successfully.