-
Notifications
You must be signed in to change notification settings - Fork 25
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 custom folders during paketo build #662
Comments
I would try setting
Normally, the buildpacks will only match the single JAR file that your build produces. That means files outside of that are considered "source code" and not included in your final container. You can adjust this pattern to match multiple files. When it matches multiple or a directory, the buildpack will keep everything. Everything that matches ends up under the |
@dmikusa-pivotal but i am unsure about the first part .. as this is a Native application so workspace just has (in my case) so this would rather be because of native builds arm limitation i cannot build locally and have to leverage github actions |
ok i guess for native images build inside docker this is a lil different, because console log tells me ok . now i see .. this is again different projekt at paketo before beeing redirect a 3rd time .. i gues the equivalent here is because this just says:
|
Sorry, I was looking into this more and I don't think it's going to work presently. We are aggressively pruning files to keep the image size down. After compilation with Maven, we strip out all of the source code and after native-image compilation, we do the same with the bytecode. For Maven and source code, you can use the argument I mentioned to ensure that stuff is retained in
The I think what is needed here is a code change to the buildpack. I'd be interested in how you'd see this working. The buildpack can certainly persist files through to your final image. We could add an env variable to the native-image buildpack like The part that is a little confusing here is that buildpacks work in a pipeline fashion and they can each transform the For example:
If you set The output of this example would be:
Your app would have to know to look in that location for the files, which may not be where it expects them. I'm curious to know what you would expect here? Where you'd expect files to exist? Where your app would need them to exist? etc... This might be something that we need to address differently. There is an issue open regarding the ability to control what files are/aren't deleted, paketo-buildpacks/libbs#103, I think the same concerns apply here. Adding a single env variable like is proposed there would probably be a better option. I still think there's questions about where stuff ends up in the final image though. If we copy |
Thank you for the very detailed description and taking so much time. The overall abstract requirement is quiete simple. This lets you define a "from path" from your project /workspace ** The concrete requirement in this special case ** Currently i simulate the behaviour by having a jib or dockerfile process the container again after paketo. Conclusion |
One additional note of reference for anyone coming upon this thread. In most cases, Spring Boot resources (i.e. files under |
i see no value in this anymore |
Just to follow up, we did end up implementing paketo-buildpacks/libbs#103 and it was released in 7.2.0. That does not have the transformation capabilities I mentioned, but it would allow you to keep the files through into the final container. You could get around that by having the same directory structure in your source code, that you require in the final image. For example: if you need Not sure if that helps, but thought I'd follow up. |
@dmikusa thank you |
@dmikusa sorry to contact you via this issue .. but i don't know another way without raising a new issue this was still open and now just has the "repo has been archived now" status |
I suspect that is closed because of project repo changes, not because we have ARM64 support complete. That is still a work in progress. What we have for ARM64 at the moment is a build-your-own option. See https://github.com/dmikusa/paketo-arm64. A past colleague at VMware also has a Docker Hub image he's published using these instructions. You can use that, but it's an unofficial image at this point. See this comment. There are still plans for official ARM64 support, but it's kind of hung up on some upstream issues that we need to build images in a sustainable way. See this and this. Upvotes on those helps. |
@dmikusa thank u very much again |
[note: as requested by https://github.com/paketo-buildpacks/base-builder/issues/484]
I am using paketo build packs with Spring Boot for Native Container Images + Maven.
And because of some limitations of flyway, I have the requirement to add an additional directory with content to the image.
JIb has a property "extraDirectories" to achieve this.
But diving into paketos documentation i could not find something similar.
So is there something that can be activated by some <BP_XX> Parameter ?
Otherwise i have to leverage JIB or a Dockerfile afterwards
Thank you in advance
The text was updated successfully, but these errors were encountered: