自建Docker Harbor镜像管理工具
Harbor是什么?Harbor 是一个开源的,基于docker registry开发的,具备用户管理,操作审核,项目管理,可扩展的镜像管理工具
Harbor 的安装配置
系统安装运行需求和建议:
1. 一台独立的linux host centos 7.4,docker 17.03.0-ce+以上版本,docker-compose 1.10.0+ .
2. 下载Harbor离线安装包进行安装
3. 自定义Harbor服务器的域名:reg.yujianbo.vip
安装步骤:
1. 安装docker
yum remove -y docker docker-common docker-selinux docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum list docker-ce.x86_64--showduplicates | sort -r
#列出可以安装的docker版本
yum -y install docker-ce-17.06.2.ce
#安装指定版本的docker
#yum list docker-ce.x86_64 --showduplicates | sort -r
#yum install docker-ce-17.03.0.ce-1.el7.centos
mkdir -p /lib/systemd/system/docker.service.d
cat > /lib/systemd/system/docker.service.d/docker.conf/etc/docker/daemon.json 10514/tcp
harbor-ui /harbor/start.sh Up (healthy)
nginx nginx -g daemon off; Up (healthy) 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp,
0.0.0.0:80->80/tcp
redis docker-entrypoint.sh redis ... Up 6379/tcp
registry /entrypoint.sh serve /etc/ ... Up (healthy) 5000/tcp
8.Harbor数据持久化的路径
数据默认存储: /data/
日志默认存储:/var/log/harbor/
9.启动Harbor的https功能
cat /srv/harbor/harbor.cfg
......
#set hostnamehostname = reg.yujianbo.vip
#set ui_url_protocol
ui_url_protocol = https
......
#The path of cert and key files for nginx, they are applied only the protocol is set to https
ssl_cert = /root/cert/reg.yujianbo.vip.crt
ssl_cert_key = /root/cert/reg.yujianbo.vip.key
......只需要配置三个地方:
ui_url_protocol = https
ssl_cert = /root/cert/reg.yujianbo.vip.crt
ssl_cert_key = /root/cert/reg.yujianbo.vip.key
10.Email settings
Email settings只是在使用harbor本地认证时,忘记密码或注册账号时用到,使用LDAP认证就不需要配置这个选项了
Harbor官网:https://goharbor.io/
Harbor github地址:https://github.com/goharbor/harbor
Harbor安装配置向导:https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md
页:
[1]