申请证书
- FreeSSL.cn,一个提供免费HTTPS证书申请的网站
下载下来的证书格式可以直接修改成
.pem
.crt
格式.
私钥
格式的文件.
.key
更新harbor证书
服务器由
harbor
启动.
docker-compose
- 更新这个目录下证书文件
cat harbor.yml
# https related config
https:
# # https port for harbor, default is 443
port: 443
# # The path of cert and key files for nginx
certificate: /usr/local/bin/harbor/certs/harbor.crt
private_key: /usr/local/bin/harbor/certs/harbor.key
- 找到
的harbor
映射的nginx
目录,更新其中的证书.cert
cat docker-compose.yml
proxy:
image: goharbor/nginx-photon:v1.9.1
container_name: nginx
volumes:
- ./common/config/nginx:/etc/nginx:z
- /data/harbor/secret/cert:/etc/cert:z
networks:
- harbor
dns_search: .
# ...
- 重启
nginx
docker-compose restart proxy