-
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
Support extra classpath folders at runtime #1157
Comments
Hi @victornoel, I wonder if you can use the following workaround. Say the config folder is Copy Then, the files will be placed under |
Ah, sorry, you're saying you want to do this at runtime. |
Wait, but reading your original post again, it doesn't seem like you really need a way to add files at runtime. |
@chanseokoh yes I do, it is to specify some configurations file that can change when the application is deployed. |
I see. How about this workaround? You'll see what entrypoint your image will have during building, e.g.,
Then you customize the entrypoint (using the
|
@chanseokoh indeed that's seems to be a valid workaround, thanks for the idea :) |
@chanseokoh in the end, it's not great, because it doesn't play well with the other options such as Any way to get a new configuration feature for this? :) |
When you are not customizing the default entrypoint (i.e., when not defining Another potential option (based on which base image you use) could be to use another environment variable: https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#jvm-flags |
@chanseokoh yes, you are right, this makes sense, I didn't think about it enough :P |
Closing since it sounds like there's a valid workaround. |
@TadCordle honestly it's more of a hack than a acceptable workaround, not very maintainable: it is relevant to think that one wants to inherit from the command line built by jib while adding some extra directories to the classpath. Personally, I abandoned the idea of changing the classpath and had to modify my application in the end… |
Ok, in that case I will reopen. The way the thread ended made it sound like everything was acceptable. |
@TadCordle no problem, thanks :) |
Related #894 |
Fixed by #1642 |
@briandealwis thanks :) |
@victornoel @kurczynski @tellisnz-shift version 1.2.0 has been released with the |
Currently, it is possible to:
/app/resources
.But it is not possible to add folders to the classpath directly.
For example, I have an image built with jib and a folder named
config
on the host containing alogback.xml
file, there is no way to add the wholeconfig
directory as a classpath entry, I have to mount each file one by one into/app/resources
.I'm not sure how to solve this though…
The text was updated successfully, but these errors were encountered: