Problem

I was running into an issue pushing a container to the DigitalOcean Container Registry. The error kept complaining of a 403 Forbidden when pushing with docker buildx, however I was able to pull without any issues.

Here is a copy of the exact error message I was running into:...
=> ERROR exporting to image                                                                                                               0.7s
=> => exporting layers                                                                                                                    0.0s
=> => exporting manifest sha256:9c131d20667646c58c82b5000b872a54ce256e94ed023b80d9128cf7f276a2b6                                          0.0s
=> => exporting config sha256:4a6b0d6647f08249bb58b909d064f6fb8207b2da75e3156405d4b44a4fe2a216                                            0.0s
=> => pushing layers                                                                                                                      0.7s
=> [auth] <registry>/<image>:pull,push token for registry.digitalocean.com                                                                      0.0s
------
> exporting to image:
------
error: failed to solve: rpc error: code = Unknown desc = failed to fetch oauth token: unexpected status: 403 Forbidden

The Solution

I would not expect this to be the case, but I was using the starter package for the Container Registry, which sets a quota for 1 registry, free not specifically to one image. Dealing with enterprise software for over 15 years now, after validating the credentials worked as expected, I upgraded the Registry plan to basic which is $5/mo, but solved the issue.

tl;dr: DigitalOcean says the limit for the free registry is one registry, however it’s actually one image.

Share this post