Open linustornkrantz opened 5 months ago
@jhuttana Please take a look at this. Thanks!
@jhuttana Please take a look at this. Thanks!
Sure
If I where to guess this is because the ubi9/openjdk-17 uses the source 2 image start script that has support for JAVA_ARGS
:
[builder@97032af7e5d2 operator]$ podman inspect registry.access.redhat.com/ubi9/openjdk-17:1.18-1 | grep CMD
"created_by": "/bin/sh -c #(nop) CMD [\"/bin/bash\"]",
"created_by": "/bin/sh -c #(nop) CMD [\"/usr/local/s2i/run\"]",
But the ubi9/openjdk-17-runtime uses another start script does not have support for JAVA_ARGS
. It only has support for "normal" arguments passed via CMD:
[builder@97032af7e5d2 operator]$ podman inspect registry.access.redhat.com/ubi9/openjdk-17-runtime:1.18-1 | grep CMD
"created_by": "/bin/sh -c #(nop) CMD [\"/bin/bash\"]",
"created_by": "/bin/sh -c #(nop) CMD [\"/opt/jboss/container/java/run/run-java.sh\"]",
@schedin 's analysis looks correct; JAVA_ARGS
is handled in the s2i/run
script, rather than run-java.sh
. Awkward!
We should probably move all the logic to run-java.sh
and have the s2i CMD be as thin as possible, or get rid of it.
Corresponding JIRA :https://issues.redhat.com/browse/OPENJDK-2968
According to https://jboss-container-images.github.io/openjdk/ubi9/ubi9-openjdk-17-runtime.html, it should be possible to set arguments with JAVA_ARGS in ubi9/openjdk-17-runtime, just as it works in ubi9/openjdk-17. However, JAVA_ARGS has no effect in ubi9/openjdk-17-runtime.
To reproduce:
For ubi9/openjdk-17, this produces:
For ubi9/openjdk-17-runtime, this produces: