-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c8d: Add --platform
flag to history, save and load
#5331
base: master
Are you sure you want to change the base?
Conversation
2ee583e
to
b3139f5
Compare
b3139f5
to
8f20d2e
Compare
cli/command/image/history.go
Outdated
If the platform is not specified, the host platform is preferred if it's available, otherwise any available platform is used. | ||
|
||
Format: os[/arch[/variant]] | ||
Example: "linux/amd64"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about including the full cmd?
Example: "linux/amd64"`) | |
Example: "docker image history --platform linux/amd64"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I (somewhat) assume that this was done to allow defining a global const
for these flags and for them to be shared (similar to what we did for --format
🤔), but I need to check if they differ in other ways
cli/command/image/load.go
Outdated
`Pick a single-platform to be loaded if the image is multi-platform. | ||
Full multi-platform image will be load if not specified. | ||
|
||
Format: os[/arch[/variant]] | ||
Example: "linux/amd64"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`Pick a single-platform to be loaded if the image is multi-platform. | |
Full multi-platform image will be load if not specified. | |
Format: os[/arch[/variant]] | |
Example: "linux/amd64"`) | |
`Specify a platform from a multi-platform image to load. | |
If a platform is not specified, and the image is a multi-platform image, all platforms are loaded. | |
Format: os[/arch[/variant]] | |
Example: "docker image load --platform linux/amd64"`) |
cli/command/image/save.go
Outdated
`Pick a single-platform to be saved if the image is multi-platform. | ||
Full multi-platform image will be saved if not specified. | ||
|
||
Format: os[/arch[/variant]] | ||
Example: "linux/amd64"`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`Pick a single-platform to be saved if the image is multi-platform. | |
Full multi-platform image will be saved if not specified. | |
Format: os[/arch[/variant]] | |
Example: "linux/amd64"`) | |
`Specify a platform from a multi-platform image to save. | |
If a platform is not specified, and the image is a multi-platform image, all platform variants are saved. | |
Format: os[/arch[/variant]] | |
Example: "docker image save --platform linux/amd64"`) |
8f20d2e
to
400f5f0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5331 +/- ##
==========================================
- Coverage 59.74% 59.73% -0.02%
==========================================
Files 345 345
Lines 23432 23469 +37
==========================================
+ Hits 14000 14019 +19
- Misses 8458 8473 +15
- Partials 974 977 +3 |
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
400f5f0
to
8ebf4cf
Compare
`Specify a platform from a multi-platform image to show the history for. | ||
If the platform is not specified, the host platform is preferred if it's available, otherwise any available platform is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dvdksn I applied your suggestions; I'm slightly wondering if we should / could condense the information a bit; for example;
Specify a platform
-> Platform from a multi-platform image ...
(I don't think we generally add Specify ....
as that's a bit implicit for options?)
The "format" could possibly be included in the first line, something like;
Platform from a multi-platform image to show the history for (format: "os[/arch[/variant]]")
By default, the daemon's native platform is preferred, otherwise any available platform is used.
(wondering if the host platform
is ambiguous, and if we need to emphasise daemon
platform)
platform
parameter to history, save and load moby/moby#48295Add
--platform
flag to history, save and load.- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)