Accept platform spec on container create#40725
Merged
Merged
Conversation
cpuguy83
force-pushed
the
check_img_platform
branch
2 times, most recently
from
March 19, 2020 23:33
c8ad739 to
0865f85
Compare
tonistiigi
reviewed
Mar 20, 2020
cpuguy83
force-pushed
the
check_img_platform
branch
3 times, most recently
from
March 20, 2020 22:28
04c8b4b to
95f59a7
Compare
This enables image lookup when creating a container to fail when the reference exists but it is for the wrong platform. This prevents trying to run an image for the wrong platform, as can be the case with, for example binfmt_misc+qemu. Signed-off-by: Brian Goff <[email protected]>
cpuguy83
force-pushed
the
check_img_platform
branch
from
March 20, 2020 23:10
95f59a7 to
7a9cb29
Compare
tonistiigi
approved these changes
Mar 26, 2020
tiborvass
reviewed
May 7, 2020
| } | ||
|
|
||
| // WithPlatform specifies the desired platform the image should have. | ||
| func WithPlatform(p *specs.Platform) func(*TestContainerConfig) { |
Member
Author
There was a problem hiding this comment.
It's not, I added it while I was iterating on the test but ended up not needing it.
tiborvass
approved these changes
May 21, 2020
Member
|
@cpuguy83 looks like this introduced a regression / change in behavior; it will now at all times print an error, even if the platform supports the other architecture (through quemu); The above previously worked, but now requires the |
Member
|
/cc @simonferquel |
This was referenced Jul 29, 2022
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.
This enables image lookup when creating a container to fail when the
reference exists but it is for the wrong platform. This prevents trying
to run an image for the wrong platform, as can be the case with, for
example binfmt_misc+qemu.