Error response from daemon: Get https://registry-1

2020-06-07 05:06发布

I am new to dockers. When I am running the docker pull sonarqube I am getting the following error.

Error response from daemon: Get https://registry-1.docker.io/v2/: dial TCP: lookup registry-1.docker.io on 192.168.65.1:53: no such host

Can you please let me know why I am getting the error and how can I rectify this.

12条回答
唯我独甜
2楼-- · 2020-06-07 05:35

If your machine are located within the Great China area or using related Virtual Server, add Registry Mirrors to help your bypass the complex network router.

Or your can set a http_proxy for your docker configuration, referencing this link: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy

查看更多
贼婆χ
3楼-- · 2020-06-07 05:37
sudo vi /etc/resolv.conf

And change nameserver to 8.8.8.8

查看更多
爷的心禁止访问
4楼-- · 2020-06-07 05:38

I had similar issue on Ubuntu 16.04 and manage to solve it by adding more nameservers

You can try too.

  1. Open config file sudo nano /etc/resolv.conf and add the following under existing nameservers

    nameserver 8.8.8.8

    nameserver 8.8.4.4

  2. run following commands to restart daemon and docker service

    sudo systemctl daemon-reload

    sudo systemctl restart docker

Now try to pull image you want docker pull sonarqube

查看更多
你好瞎i
5楼-- · 2020-06-07 05:38

In China, Add 114.114.114.114 to resolv.conf fixed it. sudo echo "nameserver 114.114.114.114" >> /etc/resolv.conf

查看更多
smile是对你的礼貌
6楼-- · 2020-06-07 05:40

I had the same issue, for me I was behind my office proxy and docker was not picking up the proxy set for terminal. To fix this, i have to set the proxy in docker settings window, which can be accessed from

task bar -> docker -> settings enter image description here

查看更多
爱情/是我丢掉的垃圾
7楼-- · 2020-06-07 05:41

You need to add to your /etc/hosts in terminal write

$ sudo nano /etc/hosts

add below line and save it, try to run command and it will be working

34.228.211.243  registry-1.docker.io
查看更多
登录 后发表回答