Skip to content

Commit 980aa44

Browse files
committed
Install packaged java 21 for rpm distoros
All supported rpm distros seems to have it. Since something else seems to bring in java 8 rpm we uninstall it at the end leaving just the 21 as the default and the java 8 jre installed from docker (for clouseau).
1 parent aa7fec1 commit 980aa44

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

bin/yum-dependencies.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ yum groupinstall -y 'Development Tools'
112112
# help2man is for docs
113113
yum install -y sudo git wget which autoconf autoconf-archive automake curl-devel libicu-devel \
114114
libtool ncurses-devel nspr-devel zip readline-devel unzip perl \
115-
createrepo xfsprogs-devel rpmdevtools
115+
createrepo xfsprogs-devel java-21-openjdk-devel rpmdevtools
116116
if [[ ${VERSION_ID} -eq 9 ]]; then
117117
dnf --enablerepo=crb install -y help2man
118118
else
@@ -181,5 +181,9 @@ else
181181
yum install -y libffi-devel
182182
fi
183183

184+
# remove openjdk8 and jna, java 21 is installed and should be the default
185+
# and clouseau installs it's won JRE 8 in /opt
186+
yum remove -y java-1.8.0-openjdk-headless jna
187+
184188
# clean up
185189
yum clean all -y

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4646
# When updating the images, consider updating pull-all-couchdbdev-docker
4747
# script as well
4848
#
49-
DEBIANS="debian-bullseye debian-bookworm"
50-
UBUNTUS="ubuntu-focal ubuntu-jammy"
49+
DEBIANS="" #debian-bullseye debian-bookworm"
50+
UBUNTUS="" #ubuntu-focal ubuntu-jammy"
5151
CENTOSES="almalinux-8 almalinux-9"
5252

5353
XPLAT_BASE="debian-bookworm"

dockerfiles/almalinux-8

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919

2020
FROM almalinux:8
2121

22-
# Install Java
23-
ENV JAVA_HOME=/opt/java/openjdk
24-
COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
25-
ENV PATH="${JAVA_HOME}/bin:${PATH}"
22+
# Java 21 installed via RPM: java-21-openjdk-devel
2623

2724
# These are needed for the Clouseau integration
2825
ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8

dockerfiles/almalinux-9

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919

2020
FROM almalinux:9
2121

22-
# Install Java
23-
ENV JAVA_HOME=/opt/java/openjdk
24-
COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
25-
ENV PATH="${JAVA_HOME}/bin:${PATH}"
22+
# Java 21 installed via RPM: java-21-openjdk-devel
2623

2724
# These are needed for the Clouseau integration
2825
ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8

0 commit comments

Comments
 (0)