-
Notifications
You must be signed in to change notification settings - Fork 127
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
[ERROR] No app.jar file located in /opt/openshift #11
Comments
@jorgemoralespou can you please help me with this? |
A good starting point to solve your problem is an assemble script: s2i-java/sti/bin/assemble. If you are using gradle build then following line in the script: Line 136 in 221c47a
results with following error: ls: cannot access /opt/openshift/*.jar: No such file or directory Obviously no jars were copied to the deploy directory. You should probably set |
i had also the problem. After i defined the "ARTIFACT_DIR" variable i got the problem solved. Is there any way to get only the artifacts into the container without the source code ? |
@uocxp you're probably wanting to use the binary-build option. Particularly if you've got a "fat jar". https://docs.openshift.com/container-platform/3.10/dev_guide/dev_tutorials/binary_builds.html |
@welshstew I am not sure if you got my point. When i use this s2i i get in addition to the jar file also the whole source code of the app in the container which makes the docker image really heavy. Usually i have a multistaging dockerfile to avoid this problem. Therefore i asked if it's possible while using this s2i to get only the jar file staged to the image without the source code. |
@uocxp checkout the buildconfig in this template: https://github.com/welshstew/fis2-generic-buildtemplate/blob/master/template.yml you'll have to change the imagestream to this one - that one is using the red hat fis-java-openshift - but should get the same results. Note that the buildconfig doesn't have any git repository source defined, and is a binary build. Once you have the buildconfig ensure you're building from a directory which only has a fat jar in it, and run: hope these may help: |
Hello,
I am trying to use this repo to create builder image and use it with source code (git repo) to create a docker image of an application (using s2i build). While the build is successful, I still get following error:
Copying all jar artifacts from /opt/app-root/src/source/target directory into /opt/openshift for later deployment...
ls: cannot access /opt/openshift/*.jar: No such file or directory
[ERROR] No app.jar file located in /opt/openshift
Build failed
ERROR: An error occurred: non-zero (13) exit code from openmeetings-builder
Here, openmeetings-builder is my builder image. I am a beginner in Docker, s2i. I am failing to understand the issue.
Can anyone please point out where I am making mistake?
Thank you.
The text was updated successfully, but these errors were encountered: