c8d/snapshot: Create any platform if not specified#47167
Merged
vvoland merged 1 commit intomoby:masterfrom Jan 23, 2024
Merged
Conversation
With containerd snapshotters enabled `docker run` currently fails when creating a container from an image that doesn't have the default host platform without an explicit `--platform` selection: ``` $ docker run image:amd64 Unable to find image 'asdf:amd64' locally docker: Error response from daemon: pull access denied for asdf, repository does not exist or may require 'docker login'. See 'docker run --help'. ``` This is confusing and the graphdriver behavior is much better here, because it runs whatever platform the image has, but prints a warning: ``` $ docker run image:amd64 WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested ``` This commits changes the containerd snapshotter behavior to be the same as the graphdriver. This doesn't affect container creation when platform is specified explicitly. ``` $ docker run --rm --platform linux/arm64 asdf:amd64 Unable to find image 'asdf:amd64' locally docker: Error response from daemon: pull access denied for asdf, repository does not exist or may require 'docker login'. See 'docker run --help'. ``` Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Member
|
Hm. Probably flaky; |
Contributor
Author
|
Not flaky, just a Windows test that's not passing (yet) with c8d. |
Member
|
oh! it has the containerd-integration label set. didn't think of that 😅 |
rumpl
approved these changes
Jan 23, 2024
Member
rumpl
left a comment
There was a problem hiding this comment.
Let’s get this one in but think of a nice way to tests these things
Contributor
Author
|
Let me get this in, I'll add a test in a follow up. |
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.
With containerd snapshotters enabled
docker runcurrently fails when creating a container from an image that doesn't have the default host platform without an explicit--platformselection:This is confusing and the graphdriver behavior is much better here, because it runs whatever platform the image has, but prints a warning:
This commits changes the containerd snapshotter behavior to be the same as the graphdriver. This doesn't affect container creation when platform is specified explicitly.
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)