在一台主机安装Harbor,使用默认的HTTP协议。
IP是192.168.33.10
。
可以在本机上通过命令行登陆:
sudo docker login 192.168.33.10
也可以从浏览器访问:
http://192.168.33.10
但从其他客户端(Mac,这样安装的docker)登陆时,出现如下错误:
docker login 192.168.33.10
Username: user1
Password: (my_password)
Error response from daemon: Get https://192.168.33.10/v2/: dial tcp 192.168.33.10:443: getsockopt: connection refused
从Harbor安装文档中可以看到说明:
https://github.com/vmware/har...
IMPORTANT: The default installation of Harbor uses HTTP - as such, you will need to add the option --insecure-registry to your client's Docker daemon and restart the Docker service.
在Harbor主机和客户机都对这个文件进行设置/etc/docker/daemon.json
:
{ "insecure-registries":["192.168.33.10"] }
并重启docker,还是不行。
如果现在不使用HTTPS协议安装Harbor,有什么办法能从客户端正常登陆访问?
解决方案
在客户端不需要设置

/etc/docker/daemon.json
,Mac不是这么做,而是:应用并重启