Skip to content

Conversation

@ndeloof
Copy link
Collaborator

@ndeloof ndeloof commented Oct 7, 2022

introduce ability to select platform for image being ran

image

@ndeloof ndeloof requested review from rumpl, thaJeztah and vvoland October 7, 2022 13:30
Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy
ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (meaning treat as a command line) (Windows specific).
Image string // Name of the image as it was passed by the operator (e.g. could be symbolic)
Platform v1.Platform `json:"-"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wondering if this one should go into HostConfig (not Config) 🤔 (haven't fully thought about it yet). If it's in HostConfig then perhaps we can also persist it to disk (i.e., remove the json:"-"), but not sure if that's needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Persisting the Platform is needed for restoring the container after daemon restart.
Since the platform is host-dependent, I think it would indeed be a better fit for HostConfig.

@tianon
Copy link

tianon commented Oct 7, 2022

If you want this to work the same way the current --platform works, it should be using platforms.Only instead of platforms.OnlyStrict 👀

(They're very confusingly named, but the difference is that platforms.Only implies the full "vector" of supported images so that users requesting linux/arm/v7 can and will be able to run linux/arm/v6 images if v7 isn't available.)

@tianon
Copy link

tianon commented Oct 7, 2022

An easy way to test that would be to use a value like linux/arm/v8 (of which I'm not aware of any images that exist today, so you should get the linux/arm/v7 images instead when you specify that).

@ndeloof ndeloof force-pushed the run_platform branch 2 times, most recently from 662e87f to 24c6c0a Compare October 11, 2022 18:04
Signed-off-by: Nicolas De Loof <[email protected]>
@vvoland
Copy link
Collaborator

vvoland commented Mar 7, 2023

Upstreamed by: moby#44958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants