GitHub Package Registry does not support multi-CPU architecture image

We can use " docker buildx" to multi-architecture images. However, if I try to push to GitHub Package Registry, it returns “406 Not Acceptable”. However, the same image is able to push to DockerHub.

Hi @joshuaavalon,

This error can be surfaced if you are trying to interact with the package registry without authenticating. Unfortunately we don’t currently support anonymous access to the package registry, regardless of if the package is private or public.

Can you please follow the authentication steps listed here: https://help.github.com/en/articles/configuring-docker-for-use-with-github-package-registry#authenticating-to-github-package-registry

I have logged in. You can take a look at https://github.com/joshuaavalon/docker-cloudflare/commit/044730ae29ade684062357f0cf92da7b1de69f8b/checks?check_suite_id=239542361

Also, I believe if you are not logged in, you get 401 Unauthorized instead of 406 Not Acceptable.

Using docker manifest create with Github packages for multi-arch containers doesn’t seem to work.

I’ve created a simple test https://github.com/bfjelds/test-packages-as-container-repo to validate that I can:

  • build amd64, arm32, and arm64 containers
  • create and push a single manifest for all of the platforms

This works with ACR and Dockerhub, but fails when I call:

> DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create --amend docker.pkg.github.com/bfjelds/test-packages-as-container-repo/test:v0.1.0 docker.pkg.github.com/bfjelds/test-packages-as-container-repo/test:v0.1.0-amd64

This is the error generated:

no such manifest: docker.pkg.github.com/bfjelds/test-packages-as-container-repo/test:v0.1.0-amd64

The container referenced can be pulled, so it stands to reason that it exists:

> docker pull docker.pkg.github.com/bfjelds/test-packages-as-container-repo/test:v0.1.0-amd64
v0.1.0-amd64: Pulling from bfjelds/test-packages-as-container-repo/test
Digest: sha256:8c6927676cde46c2ddd40c34f29d504f7dde3701f5e09e3723057bd25bfc87c7
Status: Image is up to date for docker.pkg.github.com/bfjelds/test-packages-as-container-repo/test:v0.1.0-amd64
docker.pkg.github.com/bfjelds/test-packages-as-container-repo/test:v0.1.0-amd64

Hi @bfjelds,

Using docker manifest create with Github packages for multi-arch containers doesn’t seem to work.

I’m afraid this is correct, multi-arch images aren’t currently supported. The team are however working on a new implementation of the GitHub container registry. I believe this is something that should be supported!

I’m sorry I can’t offer you a workaround for this. It is something I’ve wanted to support on my own projects and I haven’t found a way to make it work.

Regards,
Jamie.