博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
docker 私用仓库Harbor搭建及配置
阅读量:6678 次
发布时间:2019-06-25

本文共 2937 字,大约阅读时间需要 9 分钟。

hot3.png

1.下载安装docker-compose 编排服务。

2. 下载Harbor https://github.com/vmware/harbor/releases

3.解压harbor

120503_j0Zt_1867229.png

4.修改harbor.cfg配置

[root@lee make]# vi harbor.cfg ## Configuration file of Harbor#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 = 192.168.2.108#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 = http#The password for the root user of mysql db, change this before any production use.db_password = 123456#Maximum number of job workers in job servicemax_job_workers = 3#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 the default key/cert will be used.#This flag also controls the creation of the notary signer's cert.customize_crt = on#The path of cert and key files for nginx, they are applied only the protocol is set to httpsssl_cert = /data/cert/server.crtssl_cert_key = /data/cert/server.key#The path of secretkey storagesecretkey_path = /data#Admiral's url, comment this attribute, or set its value to NA when Harbor is standaloneadmiral_url = NA"harbor.cfg" 106L, 4336C

4. 配置docker-compose.yml

#复制cp  docker-compose.tpl docker-compose.yml#配置[root@lee make]# vi docker-compose.yml version: '2'services:  log:    image: vmware/harbor-log:v1.1.2    container_name: harbor-log    restart: always    volumes:      - /var/log/harbor/:/var/log/docker/:z    ports:      - 127.0.0.1:1514:514    networks:      - harbor  registry:    image: vmware/registry:2.6.2-photon    container_name: registry    restart: always    volumes:      - /data/registry:/storage:z      - ./common/config/registry/:/etc/registry/:z    ports:     - 5000:5000    networks:      - harbor    environment:      - GODEBUG=netdns=cgo    command:      ["serve", "/etc/registry/config.yml"]    depends_on:      - log    logging:      driver: "syslog"      options:      syslog-address: "tcp://127.0.0.1:1514"      tag: "registry"  mysql:    image: vmware/harbor-db:v1.1.2    container_name: harbor-db    restart: always    volumes:      - /data/database:/var/lib/mysql:z    networks:      - harbor    env_file:      - ./common/config/db/env    depends_on:      - log    logging:      driver: "syslog"      options:        syslog-address: "tcp://127.0.0.1:1514"        tag: "mysql"  adminserver:    image: vmware/harbor-adminserver:v1.1.0    container_name: harbor-adminserver    env_file:      - ./common/config/adminserver/env    restart: always    volumes:      - /data/config/:/etc/adminserver/config/:z      - /data/secretkey:/etc/adminserver/key:z      - /data/:/data/:z    networks:      - harbor"docker-compose.yml" 140L, 3223C

 

转载于:https://my.oschina.net/u/1867229/blog/1542471

你可能感兴趣的文章
shell脚本之循环语句
查看>>
感到自己自私和无力
查看>>
更改EMC-Powerpath软件的路径工作模式
查看>>
软件管理
查看>>
[ Talk is Cheap Show me the CODE ] : jQuery Mobile
查看>>
LVM——逻辑卷管理
查看>>
离线安装gcc(CentOS7)
查看>>
客运车辆监管及运营平台
查看>>
eclipse添加注释
查看>>
贝叶斯估计和最大后验估计
查看>>
COBBLER无人值守安装
查看>>
基础知识--JAVA注解ElementType
查看>>
kickstart部署centos6.2 x86_64
查看>>
salt 的用户管理
查看>>
我封装的全文检索之solr篇
查看>>
NFC的第一次接触
查看>>
RHEL7 Connection closed by foreign host.
查看>>
Nodejs开发框架之Loopback介绍
查看>>
微信小程序下拉刷新使用整理
查看>>
ubuntu12.04禁用客人会话
查看>>