I'm trying create a Docker manifest in order to create a multi-platform image my-repo/my-image:<some-tag>
on Dockerhub. Building for both platforms at once does not work since the Dockerfile expects a mounted tarball of compiled binaries. Also note that I'm using a AMD64 VM in a GitHub Actions CI, so I have to cross-compile to ARM64.
To build I use something like this:
# Build & push for ARM64; using registry cache since this takes forever to build
docker buildx build . \
--tag my-repo/my-image-arm64:<some-tag> \
--platform=linux/arm64 \
--output type=registry \
--build-arg tarball_uri=<link-to-arm64-tarball> \
--cache-to type=registry,ref=my-repo/my-image-cache,mode=max \
--cache-from type=registry,ref=my-repo/my-image-cache,mode=max
# Build & push for AMD64; a more conventional build
docker buildx build . \
--tag my-repo/my-image-amd64:<some-tag> \
--build-arg tarball_uri=<link-to-amd64-tarball>
docker push my-repo/my-image-amd64:<some-tag>
When I then however run the following command:
docker manifest create my-repo/image-name:<some-tag> \
my-repo/my-image-amd64:<some-tag> \
my-repo/my-image-arm64:<some-tag>
I get the error message
docker.io/my-repo/my-image-arm64:<some-tag> is a manifest list
, only for the ARM64 image. Generally, a manifest list is created, but without the my-repo/my-image-arm64:<some-tag>
manifest.
Assuming my-repo/my-image-arm64:<some-tag>
is now actually a manifest list, I do
docker manifest inspect my-repo/my-image-arm64:<some-tag>
but then get
no such manifest: docker.io/my-repo/my-image-arm64:<some-tag>
Any ideas of what I'm doing wrong here?