Docker: 企业级镜像仓库Harbor部署(http)
Harbor离线安装包下载地址:https://github.com/goharbor/harbor
Docker compose(安装harbor需要用到docker compose)下载地址:https://docs.docker.com/compose/install/
Docker compose是单机容器编排工具
以下是操作过程
[root@ ~]# ls
anaconda-ks.cfg dockerfile_.zip nginx nginx.tar php tomcat wordpress wordpress-4.9.-zh_CN.tar.gz
#使用xshell 将docker-compose-Linux-x86_64、harbor-offline-installer-v1.6.1.tgz放进宿主机
[root@ ~]# rz -E
rz waiting to receive.
[root@ ~]# rz -E
rz waiting to receive.
[root@ ~]# ls
anaconda-ks.cfg harbor-offline-installer-v1.6.1.tgz php wordpress-4.9.-zh_CN.tar.gz
docker-compose-Linux-x86_64 nginx tomcat
dockerfile_.zip nginx.tar wordpress
[root@ ~]# tar xvf harbor-offline-installer-v1.6.1.tgz
harbor/common/templates/
harbor/common/templates/nginx/
harbor/common/templates/nginx/nginx.https.conf
harbor/common/templates/nginx/notary.server.conf
harbor/common/templates/nginx/nginx.http.conf
harbor/common/templates/nginx/notary.upstream.conf
harbor/common/templates/ui/
harbor/common/templates/ui/env
harbor/common/templates/ui/private_key.pem
harbor/common/templates/ui/app.conf
harbor/common/templates/notary/
harbor/common/templates/notary/notary-signer.crt
harbor/common/templates/notary/signer-config.json
harbor/common/templates/notary/notary-signer-ca.crt
harbor/common/templates/notary/signer_env
harbor/common/templates/notary/server_env
harbor/common/templates/notary/signer-config.postgres.json
harbor/common/templates/notary/server-config.json
harbor/common/templates/notary/notary-signer.key
harbor/common/templates/notary/server-config.postgres.json
harbor/common/templates/adminserver/
harbor/common/templates/adminserver/env
harbor/common/templates/chartserver/
harbor/common/templates/chartserver/env
harbor/common/templates/db/
harbor/common/templates/db/env
harbor/common/templates/registry/
harbor/common/templates/registry/root.crt
harbor/common/templates/registry/config.yml
harbor/common/templates/registry/config_ha.yml
harbor/common/templates/registryctl/
harbor/common/templates/registryctl/env
harbor/common/templates/registryctl/config.yml
harbor/common/templates/log/
harbor/common/templates/log/logrotate.conf
harbor/common/templates/jobservice/
harbor/common/templates/jobservice/env
harbor/common/templates/jobservice/config.yml
harbor/common/templates/clair/
harbor/common/templates/clair/postgres_env
harbor/common/templates/clair/config.yaml
harbor/common/templates/clair/postgresql-init.d/
harbor/common/templates/clair/postgresql-init.d/README.md
harbor/common/templates/clair/clair_env
harbor/harbor.v1.6.1.tar.gz
harbor/prepare
harbor/NOTICE
harbor/LICENSE
harbor/install.sh
harbor/harbor.cfg
harbor/docker-compose.yml
harbor/open_source_license
harbor/ha/
harbor/ha/sample/
harbor/ha/sample/active_active/
harbor/ha/sample/active_active/keepalived_active_active.conf
harbor/ha/sample/active_active/check.sh
harbor/ha/sample/active_standby/
harbor/ha/sample/active_standby/keepalived_active_standby.conf
harbor/ha/sample/active_standby/check_harbor.sh
harbor/ha/initial-registry.sql
harbor/ha/docker-compose.tpl
harbor/ha/docker-compose.clair.yml
harbor/ha/docker-compose.clair.tpl
harbor/ha/docker-compose.yml
harbor/docker-compose.notary.yml
harbor/docker-compose.clair.yml
harbor/docker-compose.chartmuseum.yml
[root@ ~]# ls
anaconda-ks.cfg harbor nginx.tar wordpress
docker-compose-Linux-x86_64 harbor-offline-installer-v1.6.1.tgz php wordpress-4.9.-zh_CN.tar.gz
dockerfile_.zip nginx tomcat
#将docker-compose-Linux-x86_64移动到 /usr/bin/docker-compose
[root@ ~]# mv docker-compose-Linux-x86_64 /usr/bin/docker-compose
#加上可执行权限
[root@ ~]# chmod +x /usr/bin/docker-compose
\[root@ ~]# cd harbor
[root@ harbor]# ls
common docker-compose.notary.yml harbor.cfg LICENSE prepare
docker-compose.chartmuseum.yml docker-compose.yml harbor.v1.6.1.tar.gz NOTICE
docker-compose.clair.yml ha install.sh open_source_license
修改harbor.cfg文件,配置访问harbor的地址,这里配置成harbor主机的ip.如果这台机器有域名,也可以配置域名。
vi harbor.cfg
默认访问harbor前台界面的用户名是admin,默认密码在harbor.cfg文件中
#安装harbor准备
[root@ harbor]# ./prepare
loaded secret from file: /data/secretkey
Generated configuration file: ./common/config/nginx/nginx.conf
Generated configuration file: ./common/config/adminserver/env
Generated configuration file: ./common/config/ui/env
Generated configuration file: ./common/config/registry/config.yml
Generated configuration file: ./common/config/db/env
Generated configuration file: ./common/config/jobservice/env
Generated configuration file: ./common/config/jobservice/config.yml
Generated configuration file: ./common/config/log/logrotate.conf
Generated configuration file: ./common/config/registryctl/env
Generated configuration file: ./common/config/ui/app.conf
Generated certificate, key file: ./common/config/ui/private_key.pem, cert file: ./common/config/registry/root.crt
The configuration files are ready, please use docker-compose to start the service.
#安装harbor
[root@ harbor]# ./install.sh [Step ]: checking installation environment ... Note: docker version: 18.09. Note: docker-compose version: 1.23. [Step ]: loading Harbor images ... Loaded image: goharbor/harbor-log:v1.6.1 Loaded image: goharbor/harbor-jobservice:v1.6.1 Loaded image: goharbor/redis-photon:v1.6.1 Loaded image: goharbor/nginx-photon:v1.6.1 Loaded image: goharbor/harbor-migrator:v1.6.1 Loaded image: goharbor/chartmuseum-photon:v0.7.1-v1.6.1 Loaded image: goharbor/harbor-ui:v1.6.1 Loaded image: goharbor/harbor-db:v1.6.1 Loaded image: goharbor/registry-photon:v2.6.2-v1.6.1 Loaded image: goharbor/notary-server-photon:v0.5.1-v1.6.1 Loaded image: goharbor/notary-signer-photon:v0.5.1-v1.6.1 Loaded image: goharbor/clair-photon:v2.0.6-v1.6.1 Loaded image: goharbor/harbor-adminserver:v1.6.1 [Step ]: preparing environment ...
Clearing the configuration file: ./common/config/adminserver/env
Clearing the configuration file: ./common/config/ui/env
Clearing the configuration file: ./common/config/ui/app.conf
Clearing the configuration file: ./common/config/ui/private_key.pem
Clearing the configuration file: ./common/config/db/env
Clearing the configuration file: ./common/config/jobservice/env
Clearing the configuration file: ./common/config/jobservice/config.yml
Clearing the configuration file: ./common/config/registry/config.yml
Clearing the configuration file: ./common/config/registry/root.crt
Clearing the configuration file: ./common/config/registryctl/env
Clearing the configuration file: ./common/config/registryctl/config.yml
Clearing the configuration file: ./common/config/nginx/nginx.conf
Clearing the configuration file: ./common/config/log/logrotate.conf
loaded secret from file: /data/secretkey
Generated configuration file: ./common/config/nginx/nginx.conf
Generated configuration file: ./common/config/adminserver/env
Generated configuration file: ./common/config/ui/env
Generated configuration file: ./common/config/registry/config.yml
Generated configuration file: ./common/config/db/env
Generated configuration file: ./common/config/jobservice/env
Generated configuration file: ./common/config/jobservice/config.yml
Generated configuration file: ./common/config/log/logrotate.conf
Generated configuration file: ./common/config/registryctl/env
Generated configuration file: ./common/config/ui/app.conf
Generated certificate, key file: ./common/config/ui/private_key.pem, cert file: ./common/config/registry/root.crt
The configuration files are ready, please use docker-compose to start the service. [Step ]: checking existing instance of Harbor ... [Step ]: starting Harbor ...
Creating network "harbor_harbor" with the default driver
Creating harbor-log ...
Creating registry ...
Creating harbor-adminserver ...
Creating harbor-db ...
Creating redis ...
Creating harbor-ui ...
Creating harbor-jobservice ...
Creating nginx ... ✔ ----Harbor has been installed and started successfully.---- Now you should be able to visit the admin portal at http://192.168.1.30.
For more details, please visit https://github.com/goharbor/harbor . #查看启动容器的状态(install.sh文件里,执行了docker-compose配置文件,作用是启动容器)
[root@ harbor]# docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------
harbor-adminserver /harbor/start.sh Up (health: starting)
harbor-db /entrypoint.sh postgres Up (health: starting) /tcp
harbor-jobservice /harbor/start.sh Up
harbor-log /bin/sh -c /usr/local/bin/ ... Up (health: starting) 127.0.0.1:->/tcp
harbor-ui /harbor/start.sh Up (health: starting)
nginx nginx -g daemon off; Up (health: starting) 0.0.0.0:->/tcp,
0.0.0.0:->/tcp,
0.0.0.0:->/tcp
redis docker-entrypoint.sh redis ... Up /tcp
registry /entrypoint.sh /etc/regist ... Up (health: starting) /tcp
现在可以通过 http://192.168.1.30 来访问harbor了
作者: 梅梅~
出处: https://www.cnblogs.com/keeptesting
关于作者:专注软件测试,测试运维相关工作,请多多赐教!
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出, 原文链接 欢迎沟通交流加微信联系。 微信:yangguangkg20140901 暗号:博客园.
Docker: 企业级镜像仓库Harbor部署(http)的更多相关文章
- Docker: 企业级镜像仓库Harbor的使用
上一节,演示了Harbor的安装部署 这次我们来讲解 Harbor的使用. 我们需要了解到: 1. 如何推镜像到镜像仓库 2. 如何从镜像仓库拉取镜像 3. 如何运行从私有仓库拉取的镜像 # 查看 h ...
- docker企业级镜像仓库Harbor管理
Harbor概述 Harbor是由VMWare公司开源的容器镜像仓库.事实上,Harbor是在Docker Registry上进行了相应的企业级扩展,从而获得了更加广泛的应用,这些新的企业级特性包括: ...
- Docker 企业级镜像仓库 Harbor 的搭建与维护
目录 一.什么是 Harbor 二.Harbor 安装 2.1.Harbor 安装环境 2.2.Harbor安装 2.3 配置HTTPS 三.Harbor 的使用 3.1.登录Harbor并使用 3. ...
- Docker企业级镜像仓库harbor(vmware 中国团队)
第一步:安装docker和docker-compose 第二步:下载harbor-offline-installer-v1.3.0.tgz 第三步:上传到/opt,并解压 第四步:修改harbor.c ...
- docker企业级镜像仓库harbor
第一步:安装docker和docker-compose 第二步:下载harbor-offine-installer-v1.5.1.tgz 第三步:上传到/opt,并解压 第四步:修改harbor.cf ...
- 企业级Docker镜像仓库Harbor部署与使用
yum install docker 官网地址:https://docs.docker.com/compose/install/ 运行此命令以下载Docker Compose的当前稳定版本 1 sud ...
- docker 镜像仓库 Harbor 部署 以及 跨数据复制
docker 镜像仓库 Harbor 部署 跨数据复制 Harbor 是 Vmwar 公司开源的 企业级的 Docker Registry 管理项目 它主要 提供 Dcoker Registry 管理 ...
- 企业级镜像仓库harbor搭建
企业级镜像仓库harbor搭建 一. Harbor概述 VMware公司最近开源了企业级Registry项目Harbor,其的目标是帮助用户迅速搭建一个企业级的Docker registry 服 ...
- 企业级镜像仓库 harbor
企业级镜像仓库 harbor 前言 a. 本文主要为 Docker的视频教程 笔记. b. 环境为 CentOS 7.0 云服务器 c. 上一篇:跨 Docker 宿主机网络 overlay 类型 h ...
随机推荐
- Qt之QComboBox定制(二)
上一篇文章Qt之QComboBox定制讲到了qt实现自定义的下拉框,该篇文章主要实现了列表式的下拉框,这一节我还将继续讲解QComboBox的定制,而这一节我将会讲述更高级的用法,不仅仅是下拉列表框, ...
- Elasticsearch Search API
当执行一个搜索时,它将这个搜索请求广播给所有的索引分片.可以通过提供路由参数来控制要搜索哪些分片.例如,当检索tweets这个索引时,路由参数可以设置为用户名: curl -X POST " ...
- C++中int与string的转化
C++中int与string的转化 int本身也要用一串字符表示,前后没有双引号,告诉编译器把它当作一个数解释.缺省情况下,是当成10进制(dec)来解释,如果想用8进制,16进制,怎么办?加上前缀, ...
- Lucene 06 - 使用Lucene的Query API查询数据
目录 1 Query对象的创建(方式一): 使用子类对象 1.1 常用的Query子类对象 1.2 常用的Query子类对象使用 1.2.1 使用TermQuery 1.2.2 使用NumericRa ...
- 《HelloGitHub月刊》第 06 期
前言 <HelloGitHub>月刊做到第06期了(已经做了6个月了),在GitHub上获得了100+的stars,虽然不多,但是我很知足了,说明有人觉得这个项目是有价值的.同时园子中的' ...
- Chapter 4 Invitations——17
"Then why —"He shrugged. "I was hoping you were just letting him down easy." “这为 ...
- 基于IdentityServer4 实现.NET Core的认证授权
IdentityServer4是什么? IdentityServer4是基于ASP.NET Core实现的认证和授权框架,是对OpenID Connect和OAuth 2.0协议的实现. OpenID ...
- 基于.Net进行前端开发的技术栈发展路线(二)
前言 上一篇<我的技能树>文章分享了我的技能成长过程,还未完成,今天继续跟大家分享. 01 我的技能树 我的当前的技能树: 其中,标注为黄色旗帜的是基本掌握,标注为红色旗帜的为使用熟练.未 ...
- Linux之数据库操作
一.mysql基本操作 ,连接数据库 mysql -u root -p -h 127.0.0.1 mysql -u root -p -h 192.168.12.56 ,授予远程连接的权限 grant ...
- 学JAVA第八天,今天用循环做了个好玩的东西
今天用for循环做了个打印矩形的图案 代码如下: package nf;class Kest{ public static void main(String args[]){ int a=30; in ...