Infinispan instructions not working with UBI minimal Java 21
https://github.com/WASdev/ci.docker#session-caching
Additional steps are needed that I'm still working out. Prior to this, we were having to yum module enable -y maven:3.6 ourselves, but of course, yum isn't available in this image.
Just trying to run infinispan-client-setup.sh without that step revealed that it needs yum itself. Adding microdnf install -y yum got past that step, but then after the script runs, it apparently tries to uninstall maven, which results in errors that it can't be uninstalled:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.166 s
[INFO] Finished at: 2025-02-28T15:36:32Z
[INFO] ------------------------------------------------------------------------
+ yum remove -y maven
Error:
Problem: The operation would result in removing the following protected packages: systemd-udev
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Error: building at STEP "RUN microdnf install -y yum && infinispan-client-setup.sh": while running runtime: exit status 1
Obviously, since I'm not running the yum commands myself, but they're in the Liberty/Infinispan image, this needs to be addressed there.
Beginning of my Dockerfile, up to the failure:
ARG LIBERTY_REPO=icr.io/appcafe/open-liberty
ARG LIBERTY_TAG=kernel-slim-java21-openj9-ubi-minimal
ARG LIBERTY_IMAGE=$LIBERTY_REPO:$LIBERTY_TAG
ARG VERBOSE=true
# https://github.com/WASdev/ci.docker#session-caching
FROM $LIBERTY_IMAGE AS infinispan-client
# Install Infinispan client jars
USER root
ENV VERBOSE=true
RUN microdnf install -y yum && \
infinispan-client-setup.sh
...
I've tested this locally with an update to the infinispan-client-setup.sh to use microdnf instead of yum, and can't see any issues. Current plan is to get this fix included in the liberty base images as soon as possible.
@leochr The connected PR looks good and will get past build step but will still error during deployment with Infinispan operator without these changes https://github.com/OpenLiberty/ci.docker/pull/330. Another PR would be needed for WL docker images as well. Can someone take a look after the Java21 fix gets in?
This appears to be still not working. And now I'm at the stage of attempting to update an app that needs it. What's the status here? Best I can tell, Liberty Java 21 image does not currently support Infinispan at all? Are we the only customers using this combination?
Hmmm... the script version here does have the fix, but apparently the base image doesn't. For now, I added this to my Dockerfile, and the image build worked:
ADD --chmod=555 https://raw.githubusercontent.com/OpenLiberty/ci.docker/refs/heads/main/releases/25.0.0.7/kernel-slim/helpers/build/infinispan-client-setup.sh /opt/ol/helpers/build/
But I'm now getting a problem running the image. It's definitely related to the Infinispan stuff, but I think is not strictly caused by this, so I'll open another issue.