-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Builds with inline caching do not consistently use cache #3730
Comments
This is likely something in the Moby worker. I tried a similar reproducer in v0.11(buildx container driver) and saw no issues. We should also have plenty of tests for this in buildkit(seems to repro even in quite simple builds). There is no version info in the report. Would be interesting to know if this is 23 regression or not. |
I see this issue on Docker Desktop (v20.x.y) latest. It looks like the same issue as #2274, perhaps? |
If you are using the docker-container driver than it doesn't happen (as I understand it), but there are also downsides to using that compared to the normal drivers. I believe the same issue as #2274. We have been having this cache hit issues for a year plus at this point. |
@tonistiigi is there some work being done towards it? If so would likely want to contribute in someway towards making this work |
@king-11 I don't have specific ideas atm what part might be the cause, so general debugging is needed to understand better where this goes wrong. |
Can you point me somewhere where I should start looking into for the same |
the same here |
Context
When using the
github.com/docker/docker/client
API to trigger builds with builder versionBuilderBuildkit
(v2) and the build argumentBUILDKIT_INLINE_CACHE=1
, builds are cached only every other execution.Another user using just the Docker CLI (
docker build
) reported this same behavior in the community Slack.Expected behavior
Using the repository here: https://github.com/AaronFriel/docker-buildkit-cache-bug
Buildkit caching should consistently utilize remote caches.
Actual behavior
The example script shows this alternating caching behavior of the first stage in a dockerfile:
This alternation is consistent, it is every other build in every trial, for however many iterations, that I've run.
The text was updated successfully, but these errors were encountered: