Replies: 3 comments 12 replies
-
Good to know, that's a common cause of this issue. You definitely should not see it download every time. If we look at the debug logs for the buildpacks it'll give us some more clues. Please include Aside from that, I would strongly suggest you repeat the previous test using a
You could cache at the network layer, but that's probably overkill unless you've got a whole team of people. Other solutions:
That's not how buildpacks work. Buildpacks manage dependencies in a way that the base image/layer does not include the dependencies. This provides the advantage that you can rebase and update images without actually rebuilding, a feature that is very convenient if you need to update many images after a security issue in your base image. |
Beta Was this translation helpful? Give feedback.
-
Oh, one other question, What is your container system? Docker? Podman? CI? |
Beta Was this translation helpful? Give feedback.
-
I would also suggest updating to the latest buildpacks. There have been a couple of issues resolved recently with dependency download caching. You're on Again, the behavior you're seeing shouldn't happen. Network caching is great, offline buildpacks, and dependency mappings are not generally necessary because there should be a default level of caching that's not happening here. The build should download once the first time you build successfully for the given image name. Then rebuilds for the same image name should cache and reuse those downloads. Please try with the latest buildpack versions and let me know how that goes. If you're still not seeing the expected behavior give me another set of builds (first build & second build, delete your docker volumes before the first build to clear the cache). Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi, I have a spring boot apps, which are using packeto to build native images.
The config in gradle looks like
Both
AOT_IMG_CACHE_VER
andproject.version
are constant, and still I see in logsall the time. I am coming there from paketo-buildpacks/java#86, I have tried to use squid for caching, but none tutorials worked for me for docker based version.
I just wonder - is it not possible to just use
bellsoft/liberica-native-image-kit-container:jdk-17-nik-22.3.2-musl
instead of fetching thetar.gz
? There is a docker env anyway, so why not just calldocker pull
? As you see I have made some tries, but this is probably deeply wrong.Any help is appreciated, I am making tons of the carbon footprint :)
Beta Was this translation helpful? Give feedback.
All reactions