docker: Error response from daemon: Get https://re

2020-05-25 02:43发布

I am having this issue in my Mac system 10.11.6

system3:postgres saurabh-gupta2$ docker build -t postgres .
Sending build context to Docker daemon  38.91kB
Step 1/51 : FROM registry.access.redhat.com/rhel7/rhel
Get https://registry.access.redhat.com/v2/: Service Unavailable

docker run  -t apline 
Unable to find image 'apline:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: Service Unavailable.
See 'docker run --help'.

I have looked for solution that says to set proxy , but i have set the proxy for the wifi .

https://docs.docker.com/docker-for-mac/networking/#httphttps-proxy-support

Still it is not working .

I have set proxy for docker to . It is not working .

in Preference -> proxies

Docker version 17.12 ce

I also want to know if proxy is issue then , how can i check it is set , what is work around for this ? Is i am in wrong path ?

Edit

Every answer helps , so share how you solve that .

15条回答
时光不老,我们不散
2楼-- · 2020-05-25 03:32

The answers are provided here amazing, but if you are new in that and you don't realize full error then you may see at the end of that error net/http: TLS handshake timeout. message means that you have a slow internet connection. So it can be only that problem that's it. Toodles

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-05-25 03:34

Here are few suggestions:

  1. Try restarting your Docker service.
  2. Check your network connections. For example by the following shell commands:

    </dev/tcp/registry-1.docker.io/443 && echo Works || echo Problem
    curl https://registry-1.docker.io/v2/ && echo Works || echo Problem
    
  3. Check your proxy settings (e.g. in /etc/default/docker).

If above won't help, this could be a temporary issue with the Docker services (as per Service Unavailable).

Related: GH-842 - 503 Service Unavailable at http://hub.docker.com.

I had this problem for past days, it just worked after that.

You can consider raising the issue at docker/hub-feedback repo, check at, Docker Community Forums, or contact Docker Support directly.

查看更多
放我归山
4楼-- · 2020-05-25 03:34

try to reload daemon then restart docker service.

~$ systemctl daemon-reload
查看更多
老娘就宠你
5楼-- · 2020-05-25 03:35

I had the following entries in my /etc/hosts file:

34.228.211.243  registry-1.docker.io
34.205.88.205   auth.docker.io
104.18.121.25   production.cloudflare.docker.com

Just by commenting them out, I fixed the problem.

查看更多
Juvenile、少年°
6楼-- · 2020-05-25 03:37

For me I had this issue when I first installed Docker and ran

docker run hello-world

I got an authentication required error when I ran

$ curl https://registry-1.docker.io/v2/ && echo Works

All I needed to do was to restart my MacOS and then run the command again, it just started pulling the image and i got the message

Hello from Docker!
This message shows that your installation appears to be working correctly.
查看更多
Ridiculous、
7楼-- · 2020-05-25 03:37

I had this issue when I first installed Docker and ran

docker run hello-world

I was on a corporate network and switching to my personal network solved the issue for me.

查看更多
登录 后发表回答