1.下载harbor
url: https://github.com/goharbor/harbor/releases
安装版本为: 1.10.2
wget https://github.com/goharbor/harbor/releases/download/v1.10.2/harbor-online-installer-v1.10.2.tgz 版本有online和offline 区别是offline包含需要的镜像文件
tar xf harbor-online-installer-v1.10.2.tgz 解压缩
2.修改配置文件
修改harbor.yaml
a.修改hostname 这个可以用IP也可以用域名 最好用域名
b.修改https 下的 certificate和private_key,https还是配置好,免费证书申请: https://letsencrypt.osfipin.com/?tdsourcetag=s_pctim_aiomsg
c. data_volume和log.logcation 看自己选择修改 可以用默认也可以使用自定义路径
3.安装
a.执行 ./prepare 初始化配置
b.执行install.sh 开始安装
安装完成后查看 docker ps 查看所有镜像是否启动 如果有问题 查看 docker logs CONTAINER ID 或者NAMES
4.测试
a.在浏览器打开刚刚 horbor.yaml配置的 hostname, 使用admin账号登录 密码在harbor.yaml中
b.选择项目菜单,然后新建一个项目 例如: test
c.修改 /etc/docker/daemon.json 添加一项 “insecure-registries":["hostname"] hostname为harbor.yaml中配置的hostname,重启docker systemctl restart docker
d. 以mongo镜像测试
docker pull mongo
docker tag mongo hostname/test/test_mongo:1.0.0
docker login hostname #账号密码可以先使用admin账号
docker push hostname/test/test_mongo:1.0.0
在管理后台 在创建的test项目中 查看镜像仓库 既可看到上传的test_mongo:1.0.0
当前标题:Harbor安装-创新互联
当前地址:https://www.cdcxhl.com/article36/deoopg.html
成都网站建设公司_创新互联,为您提供全网营销推广、小程序开发、响应式网站、自适应网站、标签优化、网站内链
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联