docker 私用仓库Harbor搭建及配置
2017-09-24 00:00
661 查看
1.下载安装docker-compose 编排服务。
2. 下载Harbor https://github.com/vmware/harbor/releases
3.解压harbor
4.修改harbor.cfg配置
4. 配置docker-compose.yml
2. 下载Harbor https://github.com/vmware/harbor/releases
3.解压harbor
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 service max_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 https ssl_cert = /data/cert/server.crt ssl_cert_key = /data/cert/server.key #The path of secretkey storage secretkey_path = /data #Admiral's url, comment this attribute, or set its value to NA when Harbor is standalone admiral_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
相关文章推荐
- Docker镜像仓库Harbor之搭建及配置
- Docker镜像仓库Harbor之搭建及配置
- docker基础:私有仓库repository搭建(2):Harbor
- 使用Harbor搭建Docker私有镜像仓库服务
- Docker镜像仓库Harbor安装与配置
- 基于 Harbor 搭建 Docker 私有镜像仓库
- 搭建docker仓库harbor
- kubernetes下搭建harbor企业级docker仓库
- 基于 Harbor 搭建 Docker 私有镜像仓库
- Nexus OSS 3 搭建并配置使用 Docker & Git LFS 仓库
- Harbor -- 搭建Docker私有仓库
- Docker--------Harbor registry私有仓库搭建 [ Http ]
- Harbor,docker仓库备库的搭建
- Docker 搭建私有仓库(registry、harbor)
- Docker镜像仓库Harbor之Swagger REST API整合配置
- docker 私有镜像仓库 harbor 搭建
- 详解基于Harbor搭建Docker私有镜像仓库
- 搭建Harbor企业级docker仓库
- Docker Registry Server 搭建,配置免费HTTPS证书,及拥有权限认证、TLS 的私有仓库
- Docker Registry Server 搭建,配置免费HTTPS证书,及拥有权限认证、TLS 的私有仓库