buildx: Error load metadata for docker.io/library/alpine:3.12 with v3.0.1
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
- I have tried with the latest version of my channel (Stable or Edge)
Expected behavior
No error
Actual behavior
=> [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
[internal] load metadata for docker.io/library/alpine:3.12:
Information
- macOS Version: 10.15.6 (Catalina)
- Is it reproducible? - Yes
- Is the problem new? - Yes
- Did the problem appear with an update? - Yes, with v3.0.1
Steps to reproduce the behavior
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/
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 28
- Comments: 77 (8 by maintainers)
Worked for me:
Try ‘sudo’ if you are using linux
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
Docker desktop 20.10.5 on WSL2, removing
"credsStore": "desktop.exe",from~/.docker/config.jsondoes the job (as usual).This worked for me, thanks! Using WSL2 on Windows.
Worked for me right away after this.
Or even better,
rm /Users/<username>/.docker/.token_seedMaybe related:
+1, I was unblocked by setting
buildKitto falsedocker logout&docker logindid not fix the problem for me but aftersudo service docker restartthe build worked.How can they expect people to use docker if they make it so damn difficult just to pull an f*in image from the site. I had to identify busses, crosswalks, and bikes - then creat some creditial, then enable 2 factor identification, and I sill can’t build a damn image on my machine. Sheesh.
Happens to me today. I was already logged in and so run
docker logoutfirst and nextdocket login. Thank you @pichkasik for a hint!Hello, the commands below worked for me.
export DOCKER_BUILDKIT=0 export COMPOSE_DOCKER_CLI_BUILD=0
try sudo on macOS as well
If nothing above help, you can check
Dockerfileif there’s something typo, such as a wrong version etc.This works on me too. Thanks! 😃
Also getting this error. Freshly installed docker on WSL2 and this error started happening after a few hours:
The
api.Dockerfile:Docker Version:
Docker info:
Same here, i have issue with buildkit. Once I set
DOCKER_BUILDKIT=0or change Docker Desktop preference tobuildkit: false, everything work just fine. If isDockerfileissue, both settings should fail, but the problem seems to be more on buildkit. I am using Docker verison20.10.8This worked for me. Thanks.
thanks, worked for me
Worked for me:
In my case I was loading a Dockerfile:
The error returned was:
When visiting Docker hub, I noticed there was no tag called
latesthttps://hub.docker.com/r/riscv64/debian/tagsChanging to a valid tag fixed the issue:
Make sure the Docker image AND tag exist, otherwise you will recieve an error.
this is the only thing that worked for me
Yeah, it works for me! Thanks mate. Anyway I still trying to understand why this issue came suddenly. I am working on Windows 10 and WSL2 (Ubuntu 20.04).
In my case it was the proxy. I just disabled it in Docker Desktop and everything worked again.
This works for me, I deactived buildkit following https://stackoverflow.com/a/64466563
I installed Docker desktop on Windows 10 Edu with Debian for WSL2. I wanted to build the app of the tutorial https://docs.docker.com/get-started/02_our_app/ with a terminal connected to my Debian. I got the error of this issue when I was on Debian, but not on Windows with the powershell.
I still don’t know why it has worked.
Update: https://stackoverflow.com/questions/64382812/docker-has-the-same-error-regardless-of-what-i-try-to-build-windows-10 helped me get rid of the issue.
For me, it worked only after I changed:
FROM envoyproxy/envoy:v1.17.1toFROM docker.io/envoyproxy/envoy:v1.17.1