0%

Laravel sail unable to load metadata for docker.io

Unable to start sail

Newly installed Windows WSL2-Unbuntu21.04 and Docker Desktop 4.3.2 (72729) , after type the sail up command, I get the following error:

1
2
failed to solve with frontend dockerfile.v0: failed to create LLB definitin: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fubuntu%3Apull&service=registry.docker.io": dial tcp: 52.55.168.20:443: i/o timeout
ERROR: Service 'laravel.test' failed to build: Build failed

How to fix it?

I have tried to fix it by
1. adding the customsize DNS resovle.conf file to docker linux
2. login the docker by username and password in linux

1
docker login -u username -p password

but all failed.

Google a lot, suddenly found a article mentioned about the antivirus and firewall may block the network access of WSL.

Just disable the antivirus build-in firewall and try again, it works.

Sometime life is just that easy.