安装Harbor
docker中安装最新版私有镜像仓库harbor(v2.8.2 ) - 知乎 (zhihu.com)
在Harbor上传镜像
Springboot整合Harbor实现镜像上传_springboot harbor-CSDN博客
如果开启https://
x509: certificate relies on legacy Common Name field, use SANs instead
参考文档配置证书:(看官方文档)
Harbor 文档 |配置对 Harbor 的 HTTPS 访问 (goharbor.io)
[root@k8s-master01 ~]# docker login k8s-nodehar -u admin
Password:
Error response from daemon: Get "https://k8s-nodehar/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority
sudo vi /etc/docker/daemon.json
{
"registry-mirrors":["https://9cpn8tt6.mirror.aliyuncs.com", "https://registry.docker-cn.com"],
"insecure-registries": ["https://k8s-nodehar"], # 加入私库地址
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
}
}
systemctl daemon-reload && systemctl restart docker