docker build -t auth:1.0.0 --platform=linux/arm64 .
getting the current arch
–
In my case the problem arose because I have Apple Silicon in my laptop, and there is no version of the image I want that is compiled for linux/arm64/v8.
To see if this is your issue, try docker pull <image>
for more detailed error messages.
–
I think this has to do with issues trying to load the meta data of the image specified in the dockerfile from the dockerhub or the container repository of your choice.
a quick fix is to check if your internet is up or you have necessary access. this is what resolve it for me.
–
Started getting this error out of nowhere, checked my WSL Integration and the toggle was off.
After enabling and restarting it again it started working.
Yeap, faced with the same issue. As guys said - looks like it is their side issue or DNS is feeling bad. Try to pull it manually using docker pull
few times in a row, it may help.
Also, try to switch your internet provider from cable/wireless to gsm for example if you have the ability to do it, also working solution.
I was facing this issue while building docker container as:
Error:
[internal] load metadata for docker.io/library/node:lts-gallium:
------
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: ``
Applications failed at ./run:build line 18.
Solution:
I went to Docker desktop-->settings-->Docker engine-->
changed "buildkit": true to "buildkit": false
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
"experimental": false,
"features": {
"buildkit": false
Now Apply and restart docker and build the application.
Once application build successfully, revert back the changes of docker engine
"buildkit": false to "buildkit": true
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
"experimental": false,
"features": {
"buildkit": true
and rebuild application
For me it was because I was using docker-credential-helpers in ~/.docker/config.json
.
"auths": {
"ghcr.io": {},
"https://index.docker.io/v1/": {},
"registry-intl.eu-central-1.aliyuncs.com": {}
"credsStore": "pass"
So I needed to unlock the keystore, for example with the following command for index.docker.io
:
pass show docker-credential-helpers/aHR0cHM6Ly9pbmRleC5kb2NrZXIuaW8vdjEv/USERNAME
Happened the same to me after adding custom nameservers.
[network]
generateResolvConf = false
I reverted that line on
/etc/wsl.conf
and after doing wsl.exe --shutdown
on the powersell and restart again docker, it worked fine again.
[Specific solution] Only if building from a virtual environment.
Try deactivating it, event if it is the base one.
e.g. for conda:
conda deactivate
Check your proxy settings. For me, this got resolved after proxy settings change
git config --global http.proxy proxy-eu.<name>.com:8080
name should be replaced
For me the problem was that the the token to access the registry was outdated. So make sure that docker login your-registry
is working well.
Reference: https://github.com/docker/buildx/issues/476#issuecomment-761875948
–
After several weird attempts that were failing,
I just deleted the .docker folder
location: C:\Users\Name.docker
and it worked .... for me
–
What worked for me on Mac OS X was editing the Docker Config:
sudo vi ~/.docker/config.json
Changing
"credsStore": "desktop"
"credStore": "desktop"
And running, in my case:
sudo docker build -t php-demo .
( to build the demo/sample app )
I had the similar error when building for multiple platforms
docker buildx build --platform linux/amd64,linux/arm64 -t name:tag . -o type=image
I tried for single platform to update the base image (linux/amd64
then linux/arm64
)
docker buildx build --platform linux/amd64 -t name:tag . -o type=image
After done updating, I just canceled to run for both platforms and it works. In my case, there might be a bug when fetching latest base image for multiple platforms.
In my case it was damaged .dockerignore
file. Just try to delete it/rename it/recreate it.
The full error I got was:
[+] Building 2.2s (7/16)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.31kB 0.0s
=> [internal] load .dockerignore 0.0s
=> [internal] load metadata for docker.io/library/nginx:alpine 0.9s
=> [internal] load metadata for docker.io/library/node:16.19.1-bullseye-slim 2.0s
=> [angular-built 1/8] FROM docker.io/library/node:16.19.1-bullseye-slim@sha256:15ea844ec458ab40d10cd469352b86d82e16c3919fd1660bbfbec565fb6853a5 0.0s
=> => resolve docker.io/library/node:16.19.1-bullseye-slim@sha256:15ea844ec458ab40d10cd469352b86d82e16c3919fd1660bbfbec565fb6853a5 0.0s
=> [stage-1 1/3] FROM docker.io/library/nginx:alpine@sha256:6318314189b40e73145a48060bff4783a116c34cc7241532d0d94198fb2c9629 0.0s
=> => resolve docker.io/library/nginx:alpine@sha256:6318314189b40e73145a48060bff4783a116c34cc7241532d0d94198fb2c9629 0.0s
=> ERROR [internal] load build context 0.0s
=> => transferring context: 0.0s
------
> [internal] load build context:
------
failed to solve: rpc error: code = Internal desc = stream terminated by RST_STREAM with error code: PROTOCOL_ERROR