This issue is specific to docker buildkit using --output command with docker build.
Using DOCKER_BUILDKIT=1
Same dockerfile works fine with v2.5.0.1
No error
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.30kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/alpine:3.12 4.5s
=> [internal] load metadata for docker.io/library/golang:1.15-alpine3.12 0.0s
=> [auth] library/alpine:pull token for registry-1.docker.io 0.0s
Dockerfile (just example)
Command : docker build --target test --output type=local,dest=$(pwd)/out --platform local .
FROM --platform=${BUILDPLATFORM} golang:1.15-alpine3.12 AS base
WORKDIR /src
RUN apk add --no-cache openssh-client git
FROM alpine:3.12 AS test
WORKDIR /app
COPY --from=base xxxxx /app/
Maybe related:
[+] Building 1.9s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> ERROR [internal] load metadata for docker.io/library/tomcat:8.5-jdk8-openjdk-slim 1.8s
------
> [internal] load metadata for docker.io/library/tomcat:8.5-jdk8-openjdk-slim:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop.exe": executable file not found in $PATH, out: ``
Anything on this?
Also getting this error. Freshly installed docker on WSL2 and this error started happening after a few hours:
$ docker build --no-cache -t myDockerName -f api.Dockerfile .
[+] Building 0.5s (2/3)
[+] Building 0.5s (3/3) FINISHED
=> [internal] load build definition from api.Dockerfile 0.0s
=> => transferring dockerfile: 227B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> ERROR [internal] load metadata for docker.io/library/node:14 0.4s
------
> [internal] load metadata for docker.io/library/node:14:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out:
The api.Dockerfile:
FROM node:14
WORKDIR /usr/appdir
COPY api ./
RUN npm install
EXPOSE 32128
CMD [ "npm", "start" ]
Docker Version:
$ docker version
Client: Docker Engine - Community
Cloud integration: 1.0.7
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:17:34 2020
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.2
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8891c58
Built: Mon Dec 28 16:15:28 2020
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Docker info:
$ docker info
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.5.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.2
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: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.128-microsoft-standard
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 24.99GiB
Name: docker-desktop
ID: Q567:BLLG:6TEQ:4ITC:M3XT:OTF5:JGBI:H6AO:CVYV:G5MP:XXSH:ISZE
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio weight support
WARNING: No blkio weight_device support
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Worked for me:
Thank you let me post back on this later in the day.
On Sun, Jan 17, 2021, 2:37 PM Aleksandr Marakulin notifications@github.com
wrote:
Worked for me:
- Create an account on 'https://hub.docker.com/'
- Run in terminal: 'docker login'
- Authorized in terminal
- Try run docker build again
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/docker/buildx/issues/476#issuecomment-761875948, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AGFBRZBVB64UKZTW4IFFER3S2NC75ANCNFSM4U35J5HQ
.
Worked for me:
- Create an account on 'https://hub.docker.com/'
- Run in terminal: 'docker login'
- Authorized in terminal
- Try run docker build again
Worked for me right away after this.
Happens to me today.
I was already logged in and so run docker logout first and next docket login.
Thank you @pichkasik for a hint!
Worked for me:
Try 'sudo' if you are using linux
Try 'sudo' if you are using linux
This worked for me, thanks!
Using WSL2 on Windows.
Docker desktop 20.10.5 on WSL2, removing "credsStore": "desktop.exe", from ~/.docker/config.json does the job (as usual).
docker logout & docker login did not fix the problem for me but after sudo service docker restart the build worked.
Docker desktop 20.10.5 on WSL2, removing
"credsStore": "desktop.exe",from~/.docker/config.jsondoes the job (as usual).
This works on me too. Thanks! :)
For the ones for who none of the solutions from the above work, you could try this:
docker pull ${dockerPkgLink} for pulling the package which docker failed to load metadata forThis worked for me
For me, it worked only after I changed:
FROM envoyproxy/envoy:v1.17.1
to
FROM docker.io/envoyproxy/envoy:v1.17.1
Or even better, rm /Users/<username>/.docker/.token_seed
Using WSL2, restarting docker4windows, restarting the wsl instances would not work.
Windows reboot fixed it for me 🤷
Docker Desktop update and restart worked for me.
It maybe related about Docker desktop version - docker hub communication trouble
Most helpful comment
Worked for me: