申请证书
下载下来的证书
.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