-
Notifications
You must be signed in to change notification settings - Fork 39
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
Docker with BuildKit uses the wrong cache #16
Comments
Docker Engine v23 indeed fixes the issue. Reproduction steps for Docker v20:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
moby/buildkit#1368
There are two Dockerfiles with the same size and timestamp in this repository:
This triggers a subtle bug in BuildKit whereby the same base image is used for both builds. As a result, one image with two tags is produced instead of two different images. The build completes successfully, then one of the two container fails to run when deployed.
This is apparently fixed in Docker Engine 23 (moby/buildkit#1368). I haven't verified. I simply worked around it by disabling BuildKit. Perhaps a check could be added to the build scripts to disable BuildKit if Docker is not recent enough.
The text was updated successfully, but these errors were encountered: