quarkus
quarkus copied to clipboard
support quarkus.jib.jvm-entrypoint=INHERIT
Description
https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin
Both jib-maven-plugin and jib-gradle-plugin support jib.container.entrypoint=INHERIT to inherit container entrypoint from base image, but quarkus-container-image-jib always overrides container entrypoint.
Implementation ideas
https://github.com/quarkusio/quarkus/blob/main/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java#L382
When entrypoint is ["INHERIT"], call jibContainerBuilder.setEntrypoint(null).setProgramArguments(jibConfig.jvmArguments).
/cc @geoand
We can't really support this, because we always need to point to the Quarkus jar.
That's not true, currently I use this command:
./mvnw clean package
-Dquarkus.container-image.build=true
-Dquarkus.container-image.push=true
-Dquarkus.container-image.image="$OCI_IMAGE"
-Dquarkus.jib.base-jvm-image="$OCI_BASE_IMAGE"
-Dquarkus.jib.environment-variables.JAVA_APP_JAR=/app/quarkus-run.jar
-Dquarkus.jib.environment-variables.JAVA_OPTIONS="$JAVA_OPTIONS"
-Dquarkus.jib.jvm-entrypoint="/bin/sh,-c,mkdir -p config log secret && exec /bin/sh /app/run-java.sh"
-Dquarkus.jib.working-directory=/app
/app/run-java.sh is from src/main/jib/app/run-java.sh, which is downloaded from https://github.com/fabric8io-images/run-java-sh/blob/master/fish-pepper/run-java-sh/fp-files/run-java.sh
I would like Quarkus to support this usage to inherit entrypoint from base image.
....
-Dquarkus.jib.jvm-arguments="/bin/sh,-c,mkdir -p config log secret && exec /bin/sh /app/run-java.sh"
-Dquarkus.jib.jvm-entrypoint=INHERIT
Interesting point.
As you have already analyzed the code, would you like to take a shot at implementing your proposal?
ok, let me try :-)