Show supported platform(s) of multi-architecture container registry images in the UI
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
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 is currently blocked as 1) we lack a performant/scalable way to embed the platform details into the List Repository Tags API response 2) circumventing the former by doing extra API requests would be cumbersome and perform poorly.
For this reason, we should first focus on a simpler iteration: showing the platform details not on the tags list page (this issue) but on the tags details page: Display additional details for container regist... (#408873).
