这台harbor搭建在公司,局域网IP是192.168.2.202。本机login时,添加–insecure-registry=harbor.xxx.com 就可以了,但是外地服务器lgoin还是不行。
外地机器报的错,如下:
[root@node10 ~]# docker login harbor.xxx.com
Username: xxuser
Password:
Error response from daemon: Get http://harbor.xxx.com/v2/: Get http://192.168.2.202/service/token?account=gwuser&client_id=docker&offline_token=true&service=harbor-registry: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) (Client.Timeout exceeded while awaiting headers)
[root@node10 ~]#
以上时报错内容。
这是个二级域名,通过ngin代理出来的,外网地址是224.xxx.xx.xx,内网地址:192.168.2.202
hosts文件已经配置了224.xxx.xx.xx harbor.xxx.com;
也添加了 --insecure-registry=harbor.xxx.com 。
老师帮忙看下。