hub-feedback icon indicating copy to clipboard operation
hub-feedback copied to clipboard

Failed to fetch anonymous token with DOCKER_BUILDKIT=1

Open 99hops opened this issue 2 years ago • 5 comments

For some reason docker:dind build started failing as of yesterday

ERROR: failed to solve: node:18.13-alpine: failed to authorize: failed to fetch anonymous token: 
Get "https://auth.ipv6.docker.com/token?scope=repository%3Alibrary%2Fnode%3Apull&service=registry.docker.io": 
dial tcp [2600:1f18:2148:bc00:e947:5a7f:a49f:9126]:443: connect: network is unreachable

This is the only related thing I see but that does nothing to resolve the issue.

docker network prune --force
Deleted Networks:
disable_ipv6

If I run the same docker build as DOCKER_BUILDKIT=0 docker build there is no such problem.

What could be the cause of this?

99hops avatar Aug 24 '23 14:08 99hops

The problem is with our recent rollout of IPv6 to Docker Hub Registry endpoints.

It looks like you are running into the issue we have reported on our status page. Please follow along there for more updates as we roll out a fix for this today.

ingshtrom avatar Aug 24 '23 14:08 ingshtrom

Thanks @ingshtrom understood. I confirm adding

{
  "ipv6": true,
  "fixed-cidr-v6": "2001:db8:1::/64",
  "experimental": true,
  "ip6tables": true
}

on the host os fixed the issue.

99hops avatar Aug 24 '23 15:08 99hops

Thank you for your patience while we worked on this fix. We've just finished rolling out the solution to use a dual-stack authentication endpoint, as the ipv6 only auth endpoint was setup for the beta release.

You are welcome to keep those changes, or you can revert them and everything should continue to work as before. Please let us know if that is not the case.

ingshtrom avatar Aug 24 '23 17:08 ingshtrom