Representing architecture in image reference strings #27780
Replies: 3 comments
-
|
New year's ping. :) |
Beta Was this translation helpful? Give feedback.
-
Right I think this is a larger design issue with podman/docker that the local store naming is not really aware to manifest lists, As for naming I think appending the arch in the tag is common enough, at least I have seen it in several projects. Though really I think making users having to name arch specific is not the way to go and we should keep working with manifest lists so there is only one name that can refer to many images. |
Beta Was this translation helpful? Give feedback.
-
|
Hello, following up on this discussion with the approach we implemented in Toolbx for cross-architecture container support. The problem (recap)As discussed above and in #26621, pulling the same image for two different architectures causes the second pull to overwrite the tag of the first one, leaving it as
Considered approachesWe evaluated three options:
Chosen solutionWe went with option 3 (tag suffix). The implementation works as follows:
ResultAfter creating containers for multiple architectures, local storage looks like this: Limitations
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@DaliborKr is working on implementing support for cross-architecture containers in Toolbx, and we are wondering if there's a way to include the name of the CPU architecture in the image reference string.
If someone has the same image (eg.,
registry.fedoraproject.org/fedora:43) twice in their localcontainers/storageimage store for two different CPU architectures, then they are represented as:It's not obvious that the first line represents the image for
ppc64leand the second foramd64.So, we are wondering if there's a way to encode the architecture in the image reference string. We can use
skopeo copyor something else to tag the image in the image store, but we don't know what the tag should be.The OCI Image Format Specification seems to be only about the contents of an image, not the string reference. The Docker Image Specification has some details on the image ID, tag and repository, but not much more.
There is a grammar describing image references in the go.podman.io/image/v5/docker/reference package and its Docker counterpart at github.com/distribution/reference, but doesn't say anything about CPU architectures.
Similarly, we don't see anything in github.com/containers/buildah/util, from where I had lifted some code about image references in the past.
Right now, we are thinking of appending the architecture as a suffix. eg.,
registry.fedoraproject.org/fedora:43-ppc64le. These are already used by Fedora for its official images, but it's not clear if this is common practice.Are there any standards or conventions or suggestions on this?
Beta Was this translation helpful? Give feedback.
All reactions