Entrypoint example with run-java-sh
See original GitHub issueEnvironment: N/A
- Jib version: latest
- Build tool: Maven
- OS: Mac
Description of the issue:
run-java-sh
describes itself as a “universal startup script for Java applications, especially crafted for being run from within containers”.
I understand Jib can offer <entrypoint>
configs, yet would like to see an example of how this can be configured when there are external dependencies that include such scripts.
Expected behavior:
Example or documentation how to include external dependencies that include entrypoint scripts.
Additional details:
Mostly interested in the dynamic memory calculation functions
No, haven’t tried it 🙂
Not sure if works for your packaging layout, or requires a JAR - ref. bash script
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
Container Images - Quarkus
Custom Entrypoint. The quarkus.jib.jvm-entrypoint configuration property can be used to completely override the container entry point and can thus be used ...
Read more >Run java program and shell script on entrypoint in Dockerfile
In my child docker image where I am referencing this parent docker image, I have a separate entrypoint which starts my container as...
Read more >How to properly override the ENTRYPOINT using docker run
docker run -it --entrypoint /usr/bin/redis-cli example/redis --help. This means that if we want to pass the -al flags to our ls command we...
Read more >Run Quarkus inside docker | Dockerizing a Quarkus Application
... 33 && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If this is the case and as long as the file exists at
target/foo/bar/entrypoint.sh
by the time Jib runs (by whatever means, bymaven-resources-plugin
, whether extracted from a dependency somehow, etc.), you should be able to copy that file into an image (e.g., at/script/entrypoint.sh
) using<extraDirectories>
. Just make sure the file gets placed before the Jib plugin runs. And note, then, the entrypoint you should set should be<entrypiont>/script/entrypoint.sh
(i.e., the path inside the image). Basically, I don’t see anything particularly interesting about this scenario; Jib can copy what it can see into an image, and you set the image entrypoint to whatever suits you.AFAICT, using an entrypoint script is a regularly asked scenario ( https://github.com/GoogleContainerTools/jib/issues/3147#issuecomment-820629454 for example would be useful for exposing the class name to the script ) , not sure if it matters if it is part of the project, the base image, or external.
My question was asking how that can be done from a dependency, which I know would eventually get pulled into
target/
, so should I be able to reference<entrypoint>${project.build.directory}/foo/bar/entrypoint.sh</entrypoint>
, assuming something has already placed a file there (for example, the maven-resources-plugin)?