I was working on improving my Flask skills and at the same time learning about REST APIs and how to build them using Flask, Docker, MongoDB and AWS.
I’m using git in order to have my code available and practice whether at home or at the office macOS computer I have. Somehow, after pushing my last git update and then doing a git pull from my mac at the office i got the following docker compose build error:

failed to solve: failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fpython%3Apull&service=registry.docker.io": dial tcp: i/o timeout
After many coffees that I received from my friend’s coffee farm in Quillabamba, Peru I found a quick solution which I’m still not sure why we have to do this.
- grep command Short-Sleeve T-Shirt Unisex$25.00
- Yoda Unisex Hoodie$39.00
- !False its Funny because its True T-Shirt$25.00
- Code with Coffee Short-Sleeve Unisex T-Shirt$24.00 – $28.00
The solution was quite simple. In your terminal run these two commands:
export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0
Then I ran again in my project directory:
docker compose build and then docker compose up
And everything worked again as it did before. I’m still very confused to why this issue happened. If you have any comments please add them at the bottom of this article.
You can also contact me if you have any questions. Thanks!
I am not very sure why we should be doing, but surprisingly solution you provided worked for me well, thank you.
You’re welcome. Cheers!
I’m very new to docker and I ran into this same error. So when I tried your solution I got another error message
export: The term ‘export’ is not recognized as the name of
a cmdlet,
hello,
are you still having this issue?
I am going to install multiple versions of PHP, copied the php-fpm in the laradock folder and changed it to php-fpm-74, ran the command docker-compose up -d php-fpm-74 and reported the following error, please answer
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: Get “https://auth.docker.io/token?scope=repository%3Alaradock%2Fphp-fpm-74%3Apull&service=registry.docker.io”: dial tcp: lookup auth.docker.io on
192.168.1.1:53: read udp 192.168.1.101:63157->192.168.1.1:53: i/o timeout
Hello,
Have you resolve this? Can you post your docker compose file?