I am trying to build a multi-arch image using docker. I am using github actions for the CI. The build using buildx+qemu is fairly slow. So I am trying to build individual images on hosts with the target architecture and then stitch the created manifest to create a manifest list and push the image.
I ran following commands to achieve this
docker buildx build --progress=plain --platform linux/arm64 -o type=oci,dest=/tmp/abc-arm64.tar -t abc-arm64:1.2.0 -f Dockerfile .
docker buildx build --progress=plain --platform linux/amd64 -o type=oci,dest=/tmp/abc-amd64.tar -t abc-amd64:1.2.0 -f Dockerfile .
- Uploaded these tar files from different jobs and then downloaded into one job
docker load --input /tmp/abc-arm64.tar
docker load --input /tmp/abc-amd64.tar
docker buildx imagetools create --dry-run -t abc:1.2.0 abc-amd64:1.2.0 abc-arm64:1.2.0
but I am getting following error
error: multiple repositories currently not supported, found map[docker.io/library/abc:{} docker.io/library/abc-amd64:{} docker.io/library/abc-arm64:{}]
Is there a way to stitch multi-arch image without pushing individual images to a remote docker registry?