-
Notifications
You must be signed in to change notification settings - Fork 2k
image/inspect: Add --platform flag #5934
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
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
99a757c to
1255d87
Compare
| // Don't default to DOCKER_DEFAULT_PLATFORM env variable, always default to | ||
| // inspecting the image as-is. This also avoids forcing the platform selection | ||
| // on older APIs which don't support it. |
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.
Yeah, we need to get rid of that magic "addplatform flags" function.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
1255d87 to
0d9d187
Compare
| resp, err := apiClient.ImageInspect(ctx, ref, | ||
| client.ImageInspectWithRawResponse(&buf), | ||
| client.ImageInspectWithPlatform(platform), | ||
| ) |
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.
The alternative would be to collect a list of opts and append if set, but this is fine for now I think 👍
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.
LGTM

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)