Publish multi-arch images using `docker manifest`
What does this Merge Request do?
It changes the public-facing agentk image tags to multi-arch manifests, supporting AMD64 and ARM64 architectures to start with.
WARNING
The -arm64
and -amd64
tags are NOT PUBLIC API.
They are a temporary solution until bazel's rules_docker
supports it natively, see https://github.com/bazelbuild/rules_docker/issues/1599 for tracking.
Manual testing
I've verified that the manifest generated in https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/jobs/2080743626 is working on both amd64 (my laptop) and arm64 (a short lived EC2 instance). The post-merge manifests also look good, for example:
$ docker manifest inspect registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/agentk:stable
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 591,
"digest": "sha256:bb5d06428457a49e0139044a0985c8ecf14d3df1caf13b307f6469fd0b156b19",
"platform": {
"architecture": "amd64",
"os": "linux"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 591,
"digest": "sha256:820463e1421c10d155351d69c0f89dab6ab374df8a5f4d9fcb1f4f7bae64b7d8",
"platform": {
"architecture": "arm64",
"os": "linux"
}
}
]
}
Related issues
Resolves #213 (closed)
Edited by Hordur Freyr Yngvason