-
Notifications
You must be signed in to change notification settings - Fork 115
The puller --platform flag doesn't support platform variants #127
Comments
Looking at the OCI spec (and what is implemented in I'm not sure what the cleanest way to do this is. I don't think we can really add all of those fields to |
@ixdy afaik rules_docker is the main user of this repo, so breaking changes (as long as we follow up with PR in rules_docker) should be fine. My preference is option 1. |
@ixdy if you want one flag to fit all of this in, you could change |
The
--platform
flag I added to the puller (#113) doesn't seem to work with some of the official images like busybox, since those manifests use platform variants for some architectures:If you try to pull with
--platform=linux/amd
, it fails, presumably since the platform doesn't match fully.Docker's cli somehow handles this, apparently downloading the
v7
variant, but I don't know how it does that.I can think of a few ways to address this:
--platform
, replacing it with--os
,--architecture
, and--variant
. It's most explicit, and perhaps is what I should have done all along, but technically is a breaking change. (I'm not sure if anyone is using--platform
yet though, since it's pretty new.)--platform
to support variants somehow, eithera. with an optional
/variant
suffix (e.g.linux/arm/v7
), orb. by translating special values like those listed in https://github.com/docker-library/go-dockerlibrary/blob/master/architecture/oci-platform.go, e.g.
arm32v7
->{arm, v7}
I feel like the best options are either 1 or 2a. Thoughts?
(Note that the place I intend to use this, bazelbuild/rules_docker#544, already separates out
os
andarchitecture
, so I'll probably add a third attribute there,variant
, or maybe even turn it into a dict.)cc @KaylaNguyen @nlopezgi
The text was updated successfully, but these errors were encountered: