1. 创建证书
2. 修改harbor.yaml
https:
# https port for harbor, default is 443
port: 443
# The path of cert and key files for nginx
certificate: /root/harbor/certs/harbor.ghostwritten.com.crt
private_key: /root/harbor/certs/harbor.ghostwritten.com.key
3. 重建 harbor
镜像资源不会被删除。
$ docker-compose down
$ ./install.sh
4. 客户端验证
- 拷贝证书到
/etc/docker/certs.d/harbor.ghostwritten.com/
目录; - 重启docker服务。