[root@node33-104 ~]# docker login 10.255.33.206
Username: admin
Password:
Error response from daemon: Get “http://10.255.33.206/v2/”: Get “http://harbor.example.com/service/token?account=admin&client_id=docker&offline_token=true&service=harbor-registry”: dial tcp: lookup harbor.example.com on 10.255.33.1:53: no such host
或者报Error response from daemon: Get “https://10.255.33.206/v2/”: dial tcp 10.255.33.206:443: connect: connection refused(这种也有可能是resolve域名解析的原因)
因为安装配置文件,hostname是harbor.example.com而不是ip,所以docker无法找到harbor
解决方案:
echo ‘10.255.33.206 harbor.example.com’ > /etc/hosts