企业级Docker私有仓库Harbor管理平台构建示例
2016-12-13 14:51
711 查看
Harbor:
著名虚拟化厂商VMware开源的docker仓库平台解决方案!- 项目下载地址
- 安装Docker 以及 docker-compose [参考官网]
由于所需要的镜像较多,在下载镜像之前建议大家配置加速器,推荐大家使用Daocloud提供的加速器
其实通过github 大家都已经可以查看到有非常详细的配置使用介绍但是笔者在之前的配置中还是踩了好多坑,参考官方给的示例
配置证书无法使用…… 被坑的我体无完肤….无语死了. 所以下面给出了配置步骤,其实很简单……….
[root@harbor ]# ls common docker-compose.yml harbor.cfg install.sh LICENSE NOTICE prepare // 初始化配置脚本 [root@harbor ]# vim harbor.cfg #The IP address or hostname to access admin UI and registry service. #DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients. hostname = hub.test.com #The protocol for accessing the UI and token/notification service, by default it is http. #It can be set to https if ssl is enabled on nginx. ui_url_protocol = https // 基于TLS认证连接 #Email server uses the given username and password to authenticate on TLS connections to host and act as identity. #Identity left blank to act as username. email_identity = email_server = mail.test.com email_server_port = 25 email_username = test@test.com email_password = password email_from = admin <admin@test.com> email_ssl = false ##The initial password of Harbor admin, only works for the first time when Harbor starts. #It has no effect after the first launch of Harbor. #Change the admin password from UI after launching Harbor. harbor_admin_password = password // 管理员密码 verify_remote_cert = on #Determine whether or not to generate certificate for the registry's token. #If the value is on, the prepare script creates new root cert and private key #for generating token to access the registry. If the value is off, a key/certificate must #be supplied for token generation. customize_crt = on ....... ...... ..... #The path of cert and key files for nginx, they are applied only the protocol is set to https ssl_cert = /root/cert/ca.crt ssl_cert_key = /root/cert/ca.key [root@harbor ]# mkdir /root/cert [root@harbor ]# openssl req -newkey rsa:4096 -nodes -sha256 -keyout /root/cert/ca.key -x509 -days 365 -out /root/cert/ca.crt 省略.... ..... [root@harbor ]# ls /root/cert ca.crt ca.key [root@harbor ]# ./prepare [root@harbor ]# docker-compose up -d # 在仓库本机以及其他节点配置证书 # mkdir /etc/docker/certs.d/jevic.hub/ # cp /root/cert/ca.key /etc/docker/certs.d/jevic.hub/ # systemctl restart docker
使用域名访问即可!
相关文章推荐
- 可能是最详细的部署:Docker Registry企业级私有镜像仓库Harbor管理WEB UI
- 可能是最详细的部署:Docker Registry企业级私有镜像仓库Harbor管理WEB UI
- 可能是最详细的部署:Docker Registry企业级私有镜像仓库Harbor管理WEB UI
- 企业级私有Docker仓库Harbor搭建
- 构建docker高可用私有仓库基于Harbor开源系统
- docker 系列 - 企业级私有镜像仓库Harbor部署(转载)
- 企业级docker私有仓库harbor在Ubuntu14.04上的部署与使用
- Docker私有仓库管理之Harbor搭建
- 企业级Docker私有仓库之Harbor部署(http)
- Docker容器管理平台Humpback进阶-私有仓库
- 使用Docker构建Sonar代码质量管理平台
- 使用 harbor 搭建 docker 私有镜像仓库
- docker 私有镜像管理工具harbor 安装
- (六)构建Docker私有仓库、Gitlab仓库和持续集成环境
- docker 私有镜像仓库 harbor 搭建
- docker基础:私有仓库repository搭建(2):Harbor
- docker技术剖析--dockerfile and registry(构建容器和私有仓库)
- 企业级Docker镜像仓库的管理和运维
- docker构建私有仓库
- 构建运营商企业级云管理平台