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)的更多相关文章

  1. Docker: 企业级镜像仓库Harbor的使用

    上一节,演示了Harbor的安装部署 这次我们来讲解 Harbor的使用. 我们需要了解到: 1. 如何推镜像到镜像仓库 2. 如何从镜像仓库拉取镜像 3. 如何运行从私有仓库拉取的镜像 # 查看 h ...

  2. docker企业级镜像仓库Harbor管理

    Harbor概述 Harbor是由VMWare公司开源的容器镜像仓库.事实上,Harbor是在Docker Registry上进行了相应的企业级扩展,从而获得了更加广泛的应用,这些新的企业级特性包括: ...

  3. Docker 企业级镜像仓库 Harbor 的搭建与维护

    目录 一.什么是 Harbor 二.Harbor 安装 2.1.Harbor 安装环境 2.2.Harbor安装 2.3 配置HTTPS 三.Harbor 的使用 3.1.登录Harbor并使用 3. ...

  4. Docker企业级镜像仓库harbor(vmware 中国团队)

    第一步:安装docker和docker-compose 第二步:下载harbor-offline-installer-v1.3.0.tgz 第三步:上传到/opt,并解压 第四步:修改harbor.c ...

  5. docker企业级镜像仓库harbor

    第一步:安装docker和docker-compose 第二步:下载harbor-offine-installer-v1.5.1.tgz 第三步:上传到/opt,并解压 第四步:修改harbor.cf ...

  6. 企业级Docker镜像仓库Harbor部署与使用

    yum install docker 官网地址:https://docs.docker.com/compose/install/ 运行此命令以下载Docker Compose的当前稳定版本 1 sud ...

  7. docker 镜像仓库 Harbor 部署 以及 跨数据复制

    docker 镜像仓库 Harbor 部署 跨数据复制 Harbor 是 Vmwar 公司开源的 企业级的 Docker Registry 管理项目 它主要 提供 Dcoker Registry 管理 ...

  8. 企业级镜像仓库harbor搭建

    企业级镜像仓库harbor搭建 一.    Harbor概述 VMware公司最近开源了企业级Registry项目Harbor,其的目标是帮助用户迅速搭建一个企业级的Docker registry 服 ...

  9. 企业级镜像仓库 harbor

    企业级镜像仓库 harbor 前言 a. 本文主要为 Docker的视频教程 笔记. b. 环境为 CentOS 7.0 云服务器 c. 上一篇:跨 Docker 宿主机网络 overlay 类型 h ...

随机推荐

  1. How does the vuejs add the query and walk the object?

    让这个老实返回的页面添加特殊路由,这个页面常常都是登录注册.这次我们根据登录举例. 省略 { path:'/login?url=:url', name:'loginfirst', component: ...

  2. C++版 - 剑指offer面试题14: 调整数组顺序使奇数位于偶数前面

    题目: 调整数组顺序使奇数位于偶数前面 热度指数:11843 时间限制:1秒 空间限制:32768K 本题知识点: 数组 题目描述 输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有的奇 ...

  3. 从锅炉工到AI专家(2)

    大数据 上一节说到,大多的AI问题,会有很多个变量,这里深入的解释一下这个问题. 比如说某个网站要做用户行为分析,从而指导网站建设的改进.通常而言如果没有行为分析,并不需要采集用户太多的数据. 比如用 ...

  4. VSCode入门----设置成中文

    将VScode设置成中文. 1.如下图,安装中文插件,点击左边后,输入chinese搜索,然后选择中文件简体进行安装. 2.按住Ctrl+Shift+P,然后输入 configure ,如下图,选择“ ...

  5. GraphQL 的前世今生

    GraphQL是什么 GraphQL是一种新的API标准,它提供了一种更高效.强大和灵活的数据提供方式.它是由Facebook开发和开源,目前由来自世界各地的大公司和个人维护.GraphQL本质上是一 ...

  6. Docker最全教程——从理论到实战(五)

    往期内容链接 Docker最全教程——从理论到实战(一) Docker最全教程——从理论到实战(二) Docker最全教程——从理论到实战(三) Docker最全教程——从理论到实战(四) 本篇教程持 ...

  7. Golang垃圾回收机制(一)

    原文: http://legendtkl.com/2017/04/28/golang-gc/ 1. Golang GC 发展 Golang 从第一个版本以来,GC 一直是大家诟病最多的.但是每一个版本 ...

  8. 第57章 GrantValidationResult - Identity Server 4 中文文档(v1.0.0)

    该GrantValidationResult类模型补助确认为扩展授权和资源所有者密码授权的结果. 最常见的用法是使用身份验证(成功用例): context.Result = new GrantVali ...

  9. Linux下如何查看版本

    1.Linux查看版本当前操作系统内核信息 # uname -a   Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2 ...

  10. [Go] golang的range循环遍历通道

    range循环会无限在channels上面迭代 package main import ( "fmt" "time" ) func main() { //创建一 ...