Replies: 1 comment
|
I assume this happens because your cache is non-deterministic, so its creating new layers and/or new index/manifest/config.json file on each invocation. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have a GitLab pipeline that runs a build instruction every week and pushes the new image (if there is one) and the associated cache to the repo.
I'm using this setting:
The problem is that the cache changes even when there is no change to the image. This results in caches that are not from the same time as the image. For example, on Sunday 1, there was one new image and one new cache. Then, on Sunday 8, there was no new image because nothing changed, but there was a new cache.
Is this an expected behavior? I read that it's normal because loading the Dockerfile is concidered as an instruction in buildkit, and so is cached.
Should this be a concern? Is there a way to disable cache pushing if no new images are generated?
If anyone has any guidance or recommendations for handling this, I'm open to them.
All reactions