wsl登录harbor dial tcp: lookup xxx.xxx.xxx: no such host

root@thinkpade14r7:~/harbor# docker login registry.cluster.local

Username: admin

Password:

Error response from daemon: Get "https://registry.cluster.local/v2/": dialing registry.cluster.local:443 container via direct connection because has no HTTPS proxy: connecting to registry.cluster.local:443: dial tcp: lookup registry.cluster.local: no such host

在wsl的/etc/hosts中配置了域名解析,没用,要去windows的C:\Windows\System32\drivers\etc\hosts文件中配置才行,坑爹。

配好后把harbor的证书copy到wsl的docker域名配置里/etc/docker/certs.d/registry.cluster.local/ca.crt

bash 复制代码
root@thinkpade14r7:~/harbor# ls
LICENSE  certs  common  common.sh  data  docker-compose.yml  harbor.v2.13.0.tar.gz  harbor.yml  harbor.yml.tmpl  install.sh  prepare
root@thinkpade14r7:~/harbor# cp certs/
ca.crt             ca.key             ca.srl             cluster.local.crt  cluster.local.csr  cluster.local.key  v3.ext
root@thinkpade14r7:~/harbor# cp certs/cluster.local.crt  /etc/docker/certs.d/registry.cluster.local/ca.crt
相关推荐
.冰块.12 天前
Docker 镜像深度学习:分层 Copy‑on‑Write、Dockerfile 语法、Harbor 私有仓库实操
docker·容器·harbor·镜像·dockerfile·images
bosins13 天前
WSL2 启动即崩溃?调整超时参数解决 Docker 阻塞问题
linux·docker·wsl
bosins15 天前
彻底解决 WSL 2.7+ 空闲自动关闭/内存回收导致 Docker 中断的问题
linux·docker·wsl·dashboard
正仪16 天前
如何用vs code打开WSL内的文件目录
wsl
AngusKit17 天前
AngusRepo 与 Nexus、JFrog:私有制品库怎么选
harbor·nexus·制品仓库·私服·jfrog·依赖托管
Mr-Apple21 天前
系统找不到指定的文件-CreateInstance/CreateVm/HCS/ERROR_FILE_NOT_FOUND
linux·windows·ubuntu·wsl
2601_962298931 个月前
配置 Python 解释器
pycharm·wsl·虚拟环境·配置python解释器·远程解释器
x861 个月前
WSL 里的 node 不是你装的那个
wsl
玖石书1 个月前
WSL升级到2代并设置默认版本
wsl
youngerwang1 个月前
【WSL2 VHDX 文件格式深度研究报告(开发 + 性能优化向)】
性能优化·wsl·vhdx·文件格式解析