简体   繁体   中英

my docker cannot use private registry(503 Service Unavailable)

I want to deploy my code to the environment of production.But when I trying to run this command:

  docker login -u admin -p admin123 172.xxx.x.xxx:30003

it returned me "503 service unavailable". it told me "connection refused" when I curl http://172.xxx.x.xxx:30003 ,

it's not the first time I deploy this code and this phenomenon has never arise untill last week,how can I do with this strange problem??

1.restart docker service 2.upgrade docker desktop(with Mac system) but still the same!

my daemon.json:

{
  "insecure-registries" : [
    "172.xxx.xxx.xxx:30003",
    "127.0.0.1:5000"
  ]
}

and this is the context:

Yutongs-MacBook-Pro-2:~ yutong.liu$ docker login -u admin -p admin123 172.xxx.xxx.xxx:30003
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: login attempt to http://172.xxx.xxx.xxx:30003/v2/ failed with status: 503 Service Unavailable

Yutongs-MacBook-Pro-2:~ yutong.liu$ curl http://172.xxx.xxx.xxx:30003/
curl: (7) Failed to connect to 172.xxx.xxx.xxx port 30003: Connection refused

Try to put the address first

docker login 172.xxx.x.xxx:30003 -u admin -p admin123 

The below error is a server side error,

503 Service Unavailable

Most probably your docker registry is DOWN.

Try the following steps to root cause the issue.

First check if the docker registry port is accessible or not.

nc -zv 172.xxx.x.xxx 30003

If this is successful, you can try the following cURL request to list the docker registry catalog,

curl http://172.xxx.x.xxx:30003/v2/_catalog

If this fails, it means your docker registry is down.

Please try to confirm if the docker registry is UP or DOWN and then try again.

Hope it helps.

We have the same problem; but the docker client in windows works. It's when we try from a linux machine that it fails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM