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:

Docker compose 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.

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!

Leave a comment

Your email address will not be published.