Skip to content
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

Merged
merged 2 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/resources/ath-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ RUN apt-get update && \
&& \
apt-get clean all && rm -rf /var/cache/apt

# JDK21 https://github.com/adoptium/temurin21-binaries/releases/download/jdk21-2023-08-09-06-56-beta/OpenJDK21U-jdk_aarch64_linux_hotspot_2023-08-09-06-56.tar.gz
ARG JDK21_VERSION=2023-08-09-06-56-beta
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.gz" \
&& mkdir /usr/lib/jvm/java-21-openjdk-amd64 \
&& tar -C /usr/lib/jvm/java-21-openjdk-amd64 -xzf /tmp/jdk21.tar.gz --strip-components=1 \
&& rm -fv /tmp/jdk21.tar.gz
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

# Install a fixed firefox version that is known to work with the current selenium version, copied from https://hub.docker.com/r/selenium/node-firefox/dockerfile
ARG FIREFOX_VERSION=108.0.2
# hadolint: Do not pin packages as they are requirements only for firefox installation (and not ofr the rest of the ATH) and the effort required to track each version would be too huge
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/ath-container/set-java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if [[ $1 == '11' ]]; then
selection='11-openjdk'
elif [[ $1 == '17' ]]; then
selection='17-openjdk'
elif [[ $1 == '21' ]]; then
selection='21-openjdk'
else
echo >&2 "Unsupported java version '${1}'"
exit 1
Expand Down