-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add configuration to expose Inferred mainClass to container ENV #1640
Comments
Can you explain this a little more, perhaps with an example so we can understand the issue better? |
I use the entrypoint from the base image, where we add some common options and start the app:
But the jib already can infer the main class. So It would be more convenient to add an option to export it to the container.
|
I think this is a valid use case. @briandealwis @eisig can you add notes on why it is closed? Do you have a workaround? |
@rajetta could you please describe your situation? We have discussed about exposing some of Jib's computed information. |
@briandealwis My situation is similar to @eisig. Currently, we use fabric8 and parent project with an entrypoint shell script , which runs the Springboot jar file. The jar file is inferred based on the project name. Migrating it to jib, this is what I have in the child project. If I can infer the mainClass, then I can move it to the parent project. <extraDirectories>
<paths>${project.basedir}/src/main/jib</paths>
<permissions>
<permission>
<file>/java_entrypoint.sh</file>
<mode>755</mode>
</permission>
</permissions>
</extraDirectories>
<container>
<entrypoint>
<arg>/java_entrypoint.sh </arg>
<arg>com.oracle.acs.usermgmt.UserMgmtApplication</arg>
<!-- this is what I want to avoid. java_entrypoint.sh needs this Main class name to start the app. -->
</entrypoint>
</container> |
@eisig Can you sketch out what your entrypoint script is doing? Just so we can understand why existing mechanisms are insufficient. We're contemplating adding support for surefire-style |
My situation is Similar to @rajetta. Adding @{jib.container.mainClass} is sufficient for this situation. I closed this issue because I still need some features that should not be implemented in jib, so I wrote my own maven plugin to set up some maven properties. I add this to our projects common parent pom
I will set jib.skip, jib.from, start-class in that plugin. |
think about this. i want to use wait-for-it to control container startup order. how can i do? |
I think #894 subsumes this issue: #894 (comment) Closing. |
Is It possible to expose Inferred mainClass as container ENV? I want to use the Inferred mainClass in my own entrypoint, so I don't have to config the main class in the pom.
The text was updated successfully, but these errors were encountered: