diff --git a/home/jobs/OMERO-server/config.xml b/home/jobs/OMERO-server/config.xml index 52e012e7..740dcc22 100644 --- a/home/jobs/OMERO-server/config.xml +++ b/home/jobs/OMERO-server/config.xml @@ -156,6 +156,8 @@ omero config set omero.security.trustStore /etc/pki/ca-trust/extracted/java/cace omero config set omero.security.trustStorePassword changeit omero config set omero.mail.config true omero config set omero.server.nodedescriptors master:Blitz-0,Indexer-0,Processor-0,Storm,Tables-0 +omero config set omero.jvmcfg.append '--add-opens java.base/java.lang=ALL-UNNAMED --add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED' + # omero config set omero.mail.from your_address # omero config set omero.mail.host your_smtp_server_for_example omero certificates diff --git a/server/Dockerfile b/server/Dockerfile index 01a2fb1e..3290deb1 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -38,6 +38,15 @@ RUN dnf -y install epel-release RUN dnf -y update RUN dnf -y install blosc +# install various Java versions +RUN dnf install -y java-21-openjdk-devel java-17-openjdk-devel +RUN dnf install -y cronie + +# Add cron job to rotate java versions +ADD ./root /var/spool/cron/ +RUN chmod +x /var/spool/cron/root + + EXPOSE 4064 EXPOSE 4063 diff --git a/server/root b/server/root new file mode 100644 index 00000000..4c630af1 --- /dev/null +++ b/server/root @@ -0,0 +1,7 @@ +0 0 * * 0 ln -vfns /usr/lib/jvm/java-11-openjdk/bin/java /etc/alternatives/java +0 0 * * 1 ln -vfns /usr/lib/jvm/java-17-openjdk/bin/java /etc/alternatives/java +0 0 * * 2 ln -vfns /usr/lib/jvm/java-21-openjdk/bin/java /etc/alternatives/java +0 0 * * 3 ln -vfns /usr/lib/jvm/java-11-openjdk/bin/java /etc/alternatives/java +0 0 * * 4 ln -vfns /usr/lib/jvm/java-17-openjdk/bin/java /etc/alternatives/java +0 0 * * 5 ln -vfns /usr/lib/jvm/java-21-openjdk/bin/java /etc/alternatives/java +0 0 * * 6 ln -vfns /usr/lib/jvm/java-11-openjdk/bin/java /etc/alternatives/java