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
相关推荐
xbzb23 天前
自建镜像仓库:registry 一条命令 + harbor 部署、授权、跨库同步与卸载
docker·harbor·镜像·仓库·同步·registry
谙弆悕博士24 天前
在文件夹右键直接打开 Kali WSL:一条 `wsl --cd` 注册表脚本
windows·脚本·wsl·右击·ksli
xbzb25 天前
从零容器化部署 ECShop:Harbor 私有仓库 + 自定义 PHP 镜像 + LNMP 三容器
容器·php·harbor·镜像·仓库·ecshop
程序员沉梦听雨1 个月前
WSL2的安装与使用
linux·wsl
SoulRoar.1 个月前
WSL2 + Conda 环境下MinerU 4.x GPU 服务部署与 systemd 常驻指南
conda·wsl·文档解析·mineru
菜菜的院子2 个月前
WSL2 运行 Ubuntu 26.04 完整 GNOME 桌面(WSLg Wayland)
linux·运维·ubuntu·wsl
瑶山2 个月前
Windows + WSL2 Ubuntu + VS Code配置C++开发环境
开发语言·c++·windows·vscode·wsl
瑶山2 个月前
Windows 11 一键安装命令安装 WSL2到D盘
windows·wsl
大鹏的NLP博客2 个月前
WSL Ubuntu 26.04 升级与环境整理记录
linux·ubuntu·wsl
l1t2 个月前
修复WSL CreateInstance/E_UNEXPECTED和 mounted read-only 错误
linux·windows·wsl