Help on "ERROR [internal] load metadata for docker.io/library/node:18-alpine"

Hi,
I’m new to docker. I have downloaded docker desktop 4.34.3(170107) in my MAC (apple M2) and started its tutorial from its learning center. I cloned its database and start to build my first image with command “docker build -t welcome-to-docker .”, which is from tutorial “How do I run a container”. I just failed with following message “ERROR [internal] load metadata for docker.io / library / node:18-alpine”. I also attached a screenshot in the post. I have tried several solutions from google, such as:
a) change content “FROM node:18-alpine” to “FROM node:18” in Dockerfile
b) use sudo to run the command as “sudo docker build -t welcome-to-docker .”
c) restart docker
d) try to “docker pull node:18-alpine”
e) enable/disable vpn

neither solution works. I’m frustrated. Can anybody give me a guide? Thanks very much.

Have you tried (re/)authenticating? docker login

1 Like

thanks for your kind reply. I tried this command, but to find it froze:

Then there may be something wrong with your stored credentials, do

docker logout
docker login

Please, use </> button to share codes, terminal outputs, error messages instead of sharing screenshots. That helps others to search for similar issues and us to read it more easily and quote parts of the message so we can help you more quickly. You can find a complete guide in the following post: How to format your forum posts

Are you from China? If you are, maybe it has to do something with

or

and I heard there was a local mirror too. I found this now: Docker hub mirror in China · GitHub

1 Like

I got it, thanks very much for your remind.

thank you very much for you information. I will check these and learn from it.

Hi,
I have tried to logout and login. But it surprised me that I froze in login process. When I use the command docker logout, it works fine. I then use the command docker login, and input my username and password, then it froze. do you have any suggestion on this? thanks.

Hi Deanayalon & rimelek,
thanks very much for your help. From rimelek’s post, probably I’m blocked from China. I may be assigned with wrong DNS, so I can’t access docker.io/library/node:18-alpine. And that could explain why I can’t login through command line.

sigh…

Have you tried a mirror?

not yet. I guess maybe I should read documents and try to build a private repo

Hi, are you resolved this? I also meet this issue

$ docker compose build
[+] Building 21.3s (3/3) FINISHED                                                                                    docker:desktop-linux
 => [aipan-netdisk-search internal] load build definition from Dockerfile                                                            0.0s
 => => transferring dockerfile: 1.14kB                                                                                               0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 36)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 37)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 38)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 39)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 40)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 41)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 42)             0.0s
 => WARN: ConsistentInstructionCasing: Command 'run' should match the case of the command majority (uppercase) (line 53)             0.0s
 => ERROR [aipan-netdisk-search internal] load metadata for docker.io/library/node:18-alpine                                        21.2s
 => [aipan-netdisk-search auth] library/node:pull token for registry-1.docker.io                                                     0.0s
------
 > [aipan-netdisk-search internal] load metadata for docker.io/library/node:18-alpine:
------
failed to solve: node:18-alpine: failed to resolve source metadata for docker.io/library/node:18-alpine: failed to authorize: failed to fetch oauth token: Post "https://auth.docker.io/token": dial tcp 185.60.219.41:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

你解决这个问题了吗,我也遇到了,试了几个小时都没有解决,我有梯子,可以正常访问外网,不知道怎么回事

Hi rangerzhou,
I didn’t find a solution for this. It seems the DNS and related information are hacked so that I can’t access right place. Even with those mirror site, I still can’t get a right result. I’m still try to find a “right” mirror place for this. If you have further information, please be kind to share it. Thanks very much.

1 Like

exec command docker pull node:18,
then docker build;
i sovle this problem by this way

1 Like

Except OP has already tried that @haifengjiang

my final solution is the mirror site: https://hub.geekery.cn, https://dockerpull.com. I added both to my daemon.json. It seems working.