🐍

failed to create LLB definition: pull access denied

2021/12/24に公開約1,300字

エラー

docker-compose up --detach
Building crawler
[+] Building 3.9s (4/4) FINISHED
 => [internal] load build definition from Dockerfile                               0.0s
 => => transferring dockerfile: 37B                                                0.0s
 => [internal] load .dockerignore                                                  0.0s
 => => transferring context: 2B                                                    0.0s
 => ERROR [internal] load metadata for docker.io/library/3.9-slim:latest           3.8s
 => [auth] library/3.9-slim:pull token for registry-1.docker.io                    0.0s
------
 > [internal] load metadata for docker.io/library/3.9-slim:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
ERROR: Service 'crawler' failed to build : Build failed

要は、2点確認しろと言われている。

  1. 認証したかい?
  2. 3.9-slim:latestは存在してる?

repository does not exist or may require authorization

解決策

1. docker loginする

$ docker login
Authenticating with existing credentials...
Login Succeeded

docker-compose upしても動かない。

2. imageを確認する

イメージの指定が間違ってました、、、

- FROM 3.9-slim

+ FROM python:3.9-slim

動きました!無事解決!

参考

https://hub.docker.com/_/python

Discussion

ログインするとコメントできます