Multi-arch build using buildx gets stuck at pushing the image to Docker Hub

Hi,
I am trying to build a multi-arch docker image using buildx. I use the following command.

docker buildx build --platform linux/amd64,linux/arm64 -t adityasamantlearnings/customers:v1 --push .

The build proceeds to the step of pushing the image to DockerHub’s remote repository.

At this stage my build hangs showing the logs below, probably due to an authentication issue.

 => => pushing layers                                                                                                                                      601.2s
 => [auth] adityasamantlearnings/customers:pull,push token for registry-1.docker.io                                                                          0.0s

My repository exists. I am able to successfully push regular images using docker image push with no issues.

Just the push with docker buildx fails.

I have already authenticated my remote repository using docker login

Any idea what could be the issue?

P.S. A complete fresh install of Docker Desktop for Mac doesn’t help as well.

OS Version: Macos Sonoma 14.2.1
Docker Desktop for Mac: 24.0.7

It is working for me now, although I am not sure of the root cause.

I did the following:

  1. Uninstall and reinstall of the Docker Desktop → this did not help.
  2. Created a new auth token for Docker and used docker login with the token instead of password → this did not help initially as well.

After some time, without any further change, the images started being pushed.

So I am not clear on what fixed it, but I don’t have the energy to investigate further on the root cause :wink:

I’m experiencing this too :frowning:
any ideas?

Docker Hub has now introduced explicit HTTP 429 errors to at least indicate the root cause: Austere rate limits.

Even with a paid team subscription, multiplatform uploads are rate limited to the point of malfunctioning.

Tag aliases exacerbte this problem:

$ BUILDX_NO_DEFAULT_LOAD="true" "docker" "buildx" "imagetools" "--builder" "tuggy" "create" "-t" "n4jm4/tinyrick:0.0.22" "n4jm4/tinyrick:0.0.22-trixie" "--platform" "linux/arm64,linux/amd64,linux/amd64/v2,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7"
[+] Building 3.2s (1/1) FINISHED
 => ERROR [internal] pushing docker.io/n4jm4/tinyrick:0.0.22                                                                                  3.2s
------
 > [internal] pushing docker.io/n4jm4/tinyrick:0.0.22:
0.000 copying sha256:593b7c866c733bcde4fb8f4ebfcf9f7f62eb5f59f0ce1b7285cbc0638b7497a9 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:8fb7afd6a82b569e27270454538efd9748f55bd33bdeb5b3a4cdeda19c4edebf from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:23fdbf8bb3cac89a96898ba02a6d3596071d0fbecd0cbd14760020ae5dc12695 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:36eb8478704db5e412a242ff76d02b4c79d092bc9e364a16977266de4672d614 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:e578560e7d7f750da9cc1c103457acdd561227bfe29fecd04ae4d2d456044396 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:b3f485e0e1e86f224fb045c42045160f2a91a8745bc5f1dc58d762e30622c4a5 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:754312e4dc99b3015699c55749cee56a44e71890adef503bcccfdd2b02b2c723 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:eb78deb0cd5da3348e13a76842986d47c3a7222715f40a06f657e16a27f0424c from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:388e804ba08210d7c9694f0284312b9c5c59b5ee803033d2831d2c85c8d76d7a from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:72a5c6f8d325822678c2c90a1c001083a7328c0b870f8d3670ef9623319cab1b from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:0e78b36ef1bf2d8380f3d4a55e90960b0095320c11d41b8176580e6bc2a48679 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:50c23ddcf49f71f0484168437cd3436e5ff7e58b38deeef756f19db806b1e7df from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:01d58081201ee76758f5fd7e335efd3dfb465a2e17b27d61128050f8ba3d156d from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:cfe647ee2f5e0da63c099f2b864707fcabad93b6295c3df7e6b5932ac03b7fda from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:c645d8048524f4d36d368a2be871479d8cdb56b57e29526ce06bb751e1315a61 from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
0.000 copying sha256:6de5c098f19a03ca81d2ca99e9c8b25d8e2ad6109a863fa9c51ecf535a90f8ae from docker.io/n4jm4/tinyrick:0.0.22-trixie to docker.io/n4jm4/tinyrick:0.0.22
------
ERROR: unexpected status from HEAD request to https://registry-1.docker.io/v2/n4jm4/tinyrick/manifests/sha256:754312e4dc99b3015699c55749cee56a44e71890adef503bcccfdd2b02b2c723: 429 Too Many Requests

Update:

After careful observation, noticed that I had restated one of my tag (aliases) twice in the buildx tag aliasing command. Deduplicated tag names.

The –platform flag appears to be redundant in buildx tag aliasing commands. Removed that as well.

Made minor alterations to Docker source contents, which then alters the image checksums.

At long last, the rate limit error appears to have disappeared. Unknown exactly why. Suspect that the low level HTTP security apparatus may be poorly tuned for multiplatform operations, where repeated HTTP requests of the same contents are the norm rather than the exception. Expect on the order of 12^3 similar HTTP requests, when an account pushes or pulls objects involving multiplatform images.