Docker私有仓库搭建笔记(六)

旧巷老猫 提交于 2019-11-28 19:00:56

HTTPS 配置完结,在第五节为了搞https一路碰了不少问题。

但后面发现,原来是自己被误导了。

实现harbor v1.8.2之的一的https配置步聚

1. 解压harbor v.18.2 ,我解压到目录 /home/hb下。

2.cd到harbor目录 cd /home/hb/harbor

3.在/home/hb下创建一个证书目录cert.

4.在/home/hb/cert中上传证书server.pem, server.key 。别的名字我还没有试过,我想应该也没有问题。回头自己试下。

5.修改 harbor.yml文件如下

....

hostname: hub.shimaoiot.com

# http related config
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  port: 80

# https related config
https:
   # https port for harbor, default is 443
  port: 443
#   # The path of cert and key files for nginx
  #这里很关建,原来我以为是路径,没想到一定是证书文件和证书key,否侧nginx启不来,教训呀!
  certificate: /home/hb/cert/server.pem
  private_key: /home/hb/cert/server.key

....

就这个证书目录的坑,只要这个设置准确了。尽情的

./prepare

./install.sh 吧

打开浏览器

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!