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

前端 未结 19 1249
北海茫月
北海茫月 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:25

    I have solved this issue about $ sudo docker run hello-world following the Docker doc.

    If you are behind an HTTP Proxy server of corporate, this may solve your problem.

    Docker doc also displays other situation about HTTP proxy setting.

    0 讨论(0)
  • 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://<my.proxy.server>:8080
    Https Proxy: https://<my.proxy.server>: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://<my.proxy.server>:8080
    Https Proxy: http://<my.proxy.server>:8080
    No Proxy: localhost,127.0.0.1
    

    and everything works fine :-)

    0 讨论(0)
  • 2021-02-01 03:28

    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.

    0 讨论(0)
  • 2021-02-01 03:30

    Got this from a network filter (LuLu on macOS) blocking traffic to/from Docker-related processes.

    0 讨论(0)
  • 2021-02-01 03:30

    Run export DOCKER_CONTENT_TRUST=0 and then try it again.

    0 讨论(0)
  • 2021-02-01 03:32

    One of the problems you might need to check is, Does the registry requires VPN, Enable your VPN and try pulling again.

    Thanks.

    0 讨论(0)
提交回复
热议问题