[24.0 backport] fix: docker pull with platform checks wrong image tag#45562
Merged
[24.0 backport] fix: docker pull with platform checks wrong image tag#45562
docker pull with platform checks wrong image tag#45562Conversation
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>
vvoland
approved these changes
May 18, 2023
neersighted
approved these changes
May 18, 2023
Member
|
image-bin failure can be ignored |
natalieparellano
pushed 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docker pullwith platform checks wrong image tag #45561- A picture of a cute animal (not mandatory but encouraged)