docker: Error response from daemon: Get https://registry-1.docker.io/v2/: Service Unavailable. IN DOCKER , MAC

前端 未结 19 1362
北海茫月
北海茫月 2021-02-01 02:53

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          


        
19条回答
  •  伪装坚强ぢ
    2021-02-01 03:27

    It's clearly a proxy issue: docker proxies https connections to the wrong place. Bear in mind that docker proxy settings may be different from the operating system (and curl) ones. Here's how I managed to solve the issue:

    First of all, find out where are you proxying your docker https requests:

    # docker info | grep Proxy
    Http Proxy: http://:8080
    Https Proxy: https://:8080
    No Proxy: localhost,127.0.0.1
    

    and double check your https settings.

    In my case, I realized that the "Https proxy" was set to https://... instead of http://..., so I corrected it in /etc/sysconfig/docker file (I'm using RHEL7) and, after a docker restart with:

    # systemctl restart docker
    

    the proxy variable shows up succesfully updated:

    # docker info | grep Proxy
    Http Proxy: http://:8080
    Https Proxy: http://:8080
    No Proxy: localhost,127.0.0.1
    

    and everything works fine :-)

提交回复
热议问题