ERROR: DNS Checking loopback IP address 127.0.0.0/8, localhost or ::1 configured as the DNS server o

环境: 

ubuntu             16.04 server

docker              17.03.2~ce-0~ubuntu-xenial
rancher/server  latest

触发时机:

ERROR: DNS Checking loopback IP address 127.0.0.0/8, localhost or ::1 configured as the DNS server o_第1张图片

依据提示,复制第5部执行,创建完主机后,并未显示


报错信息:

ERROR: DNS Checking loopback IP address 127.0.0.0/8, localhost or ::1 configured as the DNS server on the host file /etc/resolv.conf, can't accept it

也可根据docker logs -f {主机CONTAINER ID}查看错误信息


解决办法:

1. $ sudo nano /etc/docker/daemon.json

2. 添加下面字符

{
"dns": ["8.8.8.8", "8.8.4.4", "your ip"]
}

ERROR: DNS Checking loopback IP address 127.0.0.0/8, localhost or ::1 configured as the DNS server o_第2张图片

ctrl + X    -〉    Y     回车保存

如不确认是否保存,按照第1部查看。

4. $ sudo service docker restart


参考处:

https://docs.docker.com/install/linux/linux-postinstall/#dns-resolver-found-in-resolvconf-and-containers-cant-use-it

ERROR: DNS Checking loopback IP address 127.0.0.0/8, localhost or ::1 configured as the DNS server o_第3张图片

你可能感兴趣的:(docker,rancher)