Skip to content
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

[24.0 backport] fix: docker pull with platform checks wrong image tag #45562

Merged
merged 1 commit into from
May 18, 2023

Conversation

This fixes a bug where, if a user pulls an image with a tag != `latest` and
a specific platform, we return an NotFound error for the wrong (`latest`) tag.
see: moby#45558

This bug was introduced in moby@779a5b3
in the changes to `daemon/images/image_pull.go`, when we started returning the error from the call to
`GetImage` after the pull. We do this call, if pulling with a specified platform, to check if the platform
of the pulled image matches the requested platform (for cases with single-arch images).
However, when we call `GetImage` we're not passing the image tag, only name, so `GetImage` assumes `latest`
which breaks when the user has requested a different tag, since there might not be such an image in the store.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
(cherry picked from commit f450ea6)
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
@thaJeztah thaJeztah added this to the 24.0.1 milestone May 18, 2023
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Member

image-bin failure can be ignored

@thaJeztah thaJeztah merged commit 821e4ec into moby:24.0 May 18, 2023
93 of 94 checks passed
natalieparellano added a commit to buildpacks/lifecycle that referenced this pull request Jun 7, 2023
pack acceptance is failing because `docker pull` is checking for the presence
of buildpacksio/lifecycle:latest instead of the commit tag that we used

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants