Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR FROM docker.io/library/deps:latest #2092

Open
montanaflynn opened this issue Apr 28, 2021 · 5 comments
Open

ERROR FROM docker.io/library/deps:latest #2092

montanaflynn opened this issue Apr 28, 2021 · 5 comments

Comments

@montanaflynn
Copy link

Very simple Dockerfile:

FROM alpine:latest
RUN apk --update add ca-certificates wget gzip

Caused this error:

 => [internal] load build definition from Dockerfile                                                                                                                                                       0.0s
 => => transferring dockerfile: 37B                                                                                                                                                                        0.0s
 => [internal] load .dockerignore                                                                                                                                                                          0.0s
 => => transferring context: 2B                                                                                                                                                                            0.0s
 => ERROR FROM docker.io/library/deps:latest                                                                                                                                                               3.6s
 => => resolve docker.io/library/deps:latest                                                                                                                                                               3.6s
------
 > FROM docker.io/library/deps:latest:
------
failed to load cache key: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Disabling buildkit fixed the problem:

DOCKER_BUILDKIT=0 docker build -t alpine/wget .
> worked...
@AkihiroSuda
Copy link
Member

Please provide docker info, docker version, and full docker build command line

@montanaflynn
Copy link
Author

docker build -t alpine/wget .

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
  scan: Docker Scan (Docker Inc., v0.6.0)

Server:
 Containers: 36
  Running: 9
  Paused: 0
  Stopped: 27
 Images: 410
 Server Version: 20.10.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc version: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.25-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.776GiB
 Name: docker-desktop
 ID: 3OJW:2GE7:MZ52:IQXD:NZ4I:CRMV:JTF7:7HZO:XYDE:XKOD:R6AB:EYMP
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
docker version
Client: Docker Engine - Community
 Cloud integration: 1.0.12
 Version:           20.10.5
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        55c4c88
 Built:             Tue Mar  2 20:13:00 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:15:47 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@WoLfulus
Copy link

WoLfulus commented Jun 11, 2021

@AkihiroSuda The problem here is because he's building deps image and trying to reference it locally on FROM statement

It's probably something like this:

deps/Dockerfile

FROM alpine:latest
RUN apk --update add ca-certificates wget gzip

$ docker build -t deps ./deps

wget/Dockerfile

FROM deps

$ docker build -t alpine/wget ./wget

I have the same problem trying to build multiple images in a docker action. Some depends on previous ones.

I can't seem to find an answer on how to use FROM <local> without buildkit trying to hit the registry to fetch metadata, even if the image has been already loaded into docker with --load of buildx

@georgeswani
Copy link

Hi All,
This issue affecting us to upgrade to the latest docker version, we are kind of stuck at 5.19 after integrating buildkit in our build system . Appreciate if there is any workaround suggestions ?

I even tracked a ticket to docker-compose repo, however this further down to an issue with buildkit.
docker/compose#8804

Thanks
George

@georgeswani
Copy link

Hi,
Is there any update or progress on this ? This is stopping us upgrading to latest docker version, we are kind of stuck at 5.19 itself :(
Thanks
George

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants