私有仓库harbor部署

	1.GitHub的官方地址
https://github.com/goharbor/harbor


	2.下载harbor
[root@centos201 ~]# wget https://github.com/goharbor/harbor/releases/download/v2.8.2/harbor-offline-installer-v2.8.2.tgz 


	3.解压软件包
[root@centos201 ~]# tar xf harbor-offline-installer-v2.8.2.tgz -C /test/softwares/

	
	4.修改配置文件
[root@centos201 ~]# cd /test/softwares/harbor/
[root@centos201 harbor]# 
[root@centos201 harbor]# cp harbor.yml.tmpl harbor.yml
[root@centos201 harbor]# 
[root@centos201 harbor]# vim harbor.yml
# 添加主机名称
hostname: harbor.lzh.com
...

# 注意掉https的相关配置
# https:
#   # https port for harbor, default is 443
#   port: 443
#   # The path of cert and key files for nginx
#   certificate: /your/certificate/path
#   private_key: /your/private/key/path
...
# 设置管理员密码
harbor_admin_password: 1  (别太简单)


	5.安装harbor
[root@centos201 harbor]# ./install.sh 


登录harbor
# echo 1 | docker login -u admin --password-stdin harbor.lzh.com
# docker login -u admin -p 1 harbor.lzh.com
# docker login harbor.lzh.com


退出harbor:
# docker logout harbor.lzh.com
posted @ 2024-02-07 17:18  只为心情愉悦  阅读(29)  评论(0编辑  收藏  举报