Merged
Conversation
This brings in client support to set the platform on container create. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
5572cd1 to
e108122
Compare
Member
|
@cpuguy83 Looks like there's a build failure |
e108122 to
14139d7
Compare
Previously we only set the platform when performing a pull, which is only initiated if pull always is set, or if the image reference does not exist in the daemon. The daemon now supports specifying which platform you wanted on container create so it can validate the image reference is the platform you thought you were getting. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
14139d7 to
ccd9d63
Compare
thaJeztah
reviewed
May 28, 2020
Comment on lines
+240
to
+243
| // Engine API version 1.41 first introduced the option to specify platform on | ||
| // create. It will produce an error if you try to set a platform on older API | ||
| // versions, so check the API version here to maintain backwards | ||
| // compatibility for CLI users. |
Member
There was a problem hiding this comment.
Should we change
Lines 125 to 129 in 590f327
Collaborator
Author
There was a problem hiding this comment.
Platform is supported on pull since I don't know when.
Member
|
@tonistiigi ptal 🤗 |
thaJeztah
approved these changes
Jun 9, 2020
Member
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM
@tonistiigi @tiborvass PTAL
Collaborator
|
On moby I'm using master at |
Collaborator
Author
|
@tiborvass I'm not sure I'm following along, here is what I'm seeing: After setting up binfmt: |
tiborvass
approved these changes
Jun 11, 2020
This was referenced Jun 17, 2020
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.
- What I did
Set platform on container create API.
- How I did it
Propagate platform to the container create API
- How to verify it
Run engine master with DOCKER_API_VERSION=1.41
Before this change:
The 2nd run would run an armhf image somewhat unexpectedly.
After this change:
The 2nd run will do a new pull to get the host native arch (ie linux/amd64).
- Description for the changelog
Propagate platform flag to container create API
- A picture of a cute animal (not mandatory but encouraged)