nickjj / docker-flask-example

A production ready example Flask app that's using Docker and Docker Compose.
MIT License
618 stars 102 forks source link

Error when doing docker compose #13

Closed gwangjinkim closed 11 months ago

gwangjinkim commented 1 year ago

I am on Windows. After docker compose up --build I get:

[+] Running 21/21
 - redis Pulled                                                                                                   62.9s
   - bb263680fed1 Pull complete                                                                                   37.5s
   - ac509f65c3e9 Pull complete                                                                                   37.7s
   - 51afc2cce3df Pull complete                                                                                   38.0s
   - 817f7e347ebd Pull complete                                                                                   38.9s
   - ab1a1215d5f9 Pull complete                                                                                   39.0s
   - db7c27bf3552 Pull complete                                                                                   39.2s
 - postgres Pulled                                                                                                61.8s
   - 3f9582a2cbe7 Already exists                                                                                   0.0s
   - 0d9d08fc1a1a Pull complete                                                                                    4.4s
   - ecae4ccb4d1b Pull complete                                                                                    5.1s
   - e75693e0d7a5 Pull complete                                                                                    6.5s
   - 1b6d5aead1a8 Pull complete                                                                                   11.0s
   - f2aa67d9a6b2 Pull complete                                                                                   13.2s
   - 7a3ec0371e36 Pull complete                                                                                   13.6s
   - 704d9d1b662d Pull complete                                                                                   14.1s
   - a6e09efc43e8 Pull complete                                                                                   57.1s
   - cb87a0a6528d Pull complete                                                                                   57.5s
   - 3e290cb732cd Pull complete                                                                                   57.6s
   - d44d65eaede3 Pull complete                                                                                   57.8s
   - 0c2430d596bb Pull complete                                                                                   58.0s
[+] Building 10.0s (11/11) FINISHED
 => [helloflask_web internal] load build definition from Dockerfile                                                1.2s
 => => transferring dockerfile: 2.26kB                                                                             0.9s
 => [helloflask_worker internal] load build definition from Dockerfile                                             1.2s
 => => transferring dockerfile: 2.26kB                                                                             0.9s
 => [helloflask_js internal] load build definition from Dockerfile                                                 3.3s
 => => transferring dockerfile: 2.26kB                                                                             0.9s
 => [helloflask_css internal] load build definition from Dockerfile                                                3.3s
 => => transferring dockerfile: 2.26kB                                                                             0.9s
 => [helloflask_web internal] load .dockerignore                                                                   3.2s
 => => transferring context: 210B                                                                                  0.7s
 => [helloflask_worker internal] load .dockerignore                                                                3.1s
 => => transferring context: 210B                                                                                  2.6s
 => [helloflask_js internal] load .dockerignore                                                                    3.2s
 => => transferring context: 210B                                                                                  2.5s
 => [helloflask_css internal] load .dockerignore                                                                   2.9s
 => => transferring context: 210B                                                                                  0.4s
 => ERROR [helloflask_worker internal] load metadata for docker.io/library/python:3.11.2-slim-bullseye             5.7s
 => ERROR [helloflask_js internal] load metadata for docker.io/library/node:18.10.0-bullseye-slim                  6.0s
 => [auth] library/python:pull token for registry-1.docker.io                                                      0.0s
------
 > [helloflask_worker internal] load metadata for docker.io/library/python:3.11.2-slim-bullseye:
------
------
 > [helloflask_js internal] load metadata for docker.io/library/node:18.10.0-bullseye-slim:
------
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 oauth token: Post "https://auth.docker.io/token": dial 
tcp: lookup auth.docker.io: no such host
nickjj commented 1 year ago

Hi,

Are you using Docker Desktop? If so which version?

Also where did you run the command? Was it from WSL 2?

gwangjinkim commented 1 year ago

@nickjj Yes, using Docker Desktop. Docker version 20.10.17, build 100c701 I did run the command from PowerShell Windows10. However, the docker is installed via WSL2, true.

nickjj commented 1 year ago

Can you try running the command from a WSL 2 terminal?

The official Microsoft Terminal can be downloaded here: https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701

nickjj commented 11 months ago

I'm going to close this one as this project does work through WSL 2.