作者:程序那点事儿 日期:2024/02/02 14:10
执行登录命令:docker login -uadmin 192.168.43.106:8880
报错:
Error response from daemon: Get "https://192.168.43.106:8880/v2/": http: server gave HTTP response to HTTPS client
原因是我们docker client使用的是https,而我们搭建的Harbor私库用的是http的,所以会有这样的报错,导致访问不了。
解决办法: vim /etc/docker/daemon.json
"insecure-registries":["192.168.43.106:8880"], # 添加docker信任地址
systemctl daemon-reload
systemctl restart docker
#### 注意:出现如下报错大概率是地址写错了!###
Error response from daemon: Get "http://192.168.43.105:8880/v2/": Get "http://192.168.3.106:8880/service/token?account=admin&client_id=docker&offline_token=true&service=harbor-registry": dial tcp 192.168.3.106:8880: i/o timeout
是ip地址写错了,坑爹呀!
docker-compose down -v
./prepare
docker-compose up -d