Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support quarkus.jib.jvm-entrypoint=INHERIT #28071

Closed
Dieken opened this issue Sep 19, 2022 · 6 comments · Fixed by #28097
Closed

support quarkus.jib.jvm-entrypoint=INHERIT #28071

Dieken opened this issue Sep 19, 2022 · 6 comments · Fixed by #28097
Labels
area/container-image kind/enhancement New feature or request triage/wontfix This will not be worked on
Milestone

Comments

@Dieken
Copy link
Contributor

Dieken commented Sep 19, 2022

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).

@Dieken Dieken added the kind/enhancement New feature or request label Sep 19, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 19, 2022

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Sep 20, 2022

We can't really support this, because we always need to point to the Quarkus jar.

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2022
@geoand geoand added the triage/wontfix This will not be worked on label Sep 20, 2022
@Dieken
Copy link
Contributor Author

Dieken commented Sep 20, 2022

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

@geoand
Copy link
Contributor

geoand commented Sep 20, 2022

Interesting point.

@geoand geoand reopened this Sep 20, 2022
@geoand
Copy link
Contributor

geoand commented Sep 20, 2022

As you have already analyzed the code, would you like to take a shot at implementing your proposal?

@Dieken
Copy link
Contributor Author

Dieken commented Sep 20, 2022

ok, let me try :-)

Dieken added a commit to Dieken/quarkus that referenced this issue Sep 20, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
Dieken added a commit to Dieken/quarkus that referenced this issue Sep 20, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
Dieken added a commit to Dieken/quarkus that referenced this issue Sep 21, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
Dieken added a commit to Dieken/quarkus that referenced this issue Sep 21, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
Dieken added a commit to Dieken/quarkus that referenced this issue Sep 21, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Sep 22, 2022
@gsmet gsmet modified the milestones: 2.14 - main, 2.13.1.Final Sep 30, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Oct 3, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071

(cherry picked from commit 74290e4)
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 16, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
igorregis pushed a commit to igorregis/quarkus that referenced this issue Oct 17, 2022
…ve-entrypoint

jib-maven-plugin and jib-gradle-plugin both support this option to inherit entrypoint
from base image, so make Quarkus learn it.

Fixed quarkusio#28071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/container-image kind/enhancement New feature or request triage/wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants