Skip to content

Is the cache layer only used to build the same image? #55

Answered by jromero
0xLiang233 asked this question in Q&A
Discussion options

You must be logged in to vote

The project has made the decision to try to prevent contamination between image builds. What this means is that by default caches are determined by image name (including tag). There was a recent feature that should allow you to share cache although it's more intended to solve other problems (specifically caching in CI/CD environments).

Essentially, you can cache the contents in a "cache-image" and you can specify the same cache image for both images. See https://buildpacks.io/docs/app-developer-guide/using-cache-image/. Keep in mind, that this introduces the risk of cache poisoning.

This option is also available for the lifecycle if you are using buildpacks in a different platform than pack.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jromero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants