-
Notifications
You must be signed in to change notification settings - Fork 545
Output correct image ID when using Docker with the containerd-snapshotter #3136
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
Conversation
78578ba
to
54d9157
Compare
commands/build.go
Outdated
dgst := resp[exptypes.ExporterImageDigestKey] | ||
if v, ok := resp[exptypes.ExporterImageConfigDigestKey]; ok { | ||
dgst = v | ||
func getImageID(resp map[string]string, dockerUsingContainerdSnapshotter bool) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dockerUsingContainerdSnapshotter
should be preferImageDigest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks.
54d9157
to
460e2a1
Compare
Thanks @tonistiigi for the review and comments, I've answered them, PTAL when you get a chance. Thanks again! |
ddef55c
to
abbd9e7
Compare
abbd9e7
to
7343660
Compare
785c473
to
ba3a7fb
Compare
…tter. Prior to this change, the following command emits the wrong image ID when buildx uses the "docker-container" driver and Docker is configured with the containerd-snapshotter. $ docker buildx build --load --iidfile=img.txt $ docker run --rm "$(cat img.txt)" echo hello docker: Error response from daemon: No such image: sha256:4ac37e81e00f242010e42f3251094e47de6100e01d25e9bd0feac6b8906976df. See 'docker run --help'. The problem is that buildx is outputing the incorrect image ID in this scenario (it's outputing the container image config digest, instead of the container image digest used by the containerd-snapshotter). This commit fixes this. See moby/moby#45458. Signed-off-by: Cesar Talledo <[email protected]>
ba3a7fb
to
6794078
Compare
Prior to this change, the following command emits the wrong image ID when buildx uses the "docker-container" driver and Docker is configured with the containerd-snapshotter.
The problem is that buildx is outputing the incorrect image ID in this scenario (it's outputing the container image config digest, instead of the container image digest used by the containerd-snapshotter).
This commit fixes this. See moby/moby#45458.