Show supported platform(s) of multi-architecture container registry images in the UI
Context
Part of Improve container registry multi-architecture i... (&11952).
This is based on customer feedback. See #232815 (comment 1049773458).
Task
Multi-architecture container images are based on Docker manifest lists or OCI image indexes. Regardless of which, the manifest of multi-architecture images have a platform
object which contains at least the following attributes:
-
architecture
: The target CPU architecture; -
os
: The target operating system.
Sample Docker manifest list payload:
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 7143,
"digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f",
"platform": {
"architecture": "arm64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 7682,
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
"platform": {
"architecture": "amd64",
"os": "linux"
}
}
]
}
The above shows that this multi-arch image comprises two platform-specific images, one for arm64/linux
and another for amd64/linux
.
Problem
We're not displaying the supported platform(s) of multi-architecture container images in the UI. This requires users to either manually pull the image or inspect its manifest payload with e.g., docker manifest inspect
.
Proposal
Display supported platform(s) for multi-architecture images. This can be done for example, with a badge for each supported platform, as illustrated below:
The benefit of this is to provide a visual clue that lets users easily identify what platform-specific images a given list/index supports without having to manual open the details for each of them to see that information (which is currently not available but will be added in #408873).
Implementation
This should build upon #408873, where we'll retrieve the additional details for each list/index in the current page.