• Harbor源码部署


    Harbor部署

    1.下载harbor离线包

    wget https://storage.googleapis.com/harbor-releases/release-1.9.0/harbor-offline-installer-v1.9.1.tgz

    2.解压安装

    tar zxf harbor-offline-installer-v1.9.1.tgz

    3.修改配置

    cd /usr/local/harbor/
    vim harbor.yml
    hostname:  10.0.16.10    (修改域名或ip)

    4.登录harbor

    docker  login   10.0.16.10                       (用户名,密码都在配置文件中)

    报错,可修改/etc/docker/daemon.json,加入"insecure-registries"

    {
            "registry-mirrors": [ "http://hub-mirror.c.163.com" ],
            "insecure-registries": ["10.0.16.10"]
    }

    重新登录即可

    docker  login   10.0.16.10

    在浏览器上登录

     新建项目

    5.推送镜像

     使用规范格式操作

    [root@VM-16-10-centos harbor]# docker images
    REPOSITORY                      TAG                             IMAGE ID       CREATED        SIZE
    rancher/rancher-agent           v2.6.2                          615d5b746927   9 days ago     495MB
    rancher/rancher                 stable                          ec97968cb7d3   9 days ago     1.12GB
    10.0.16.10/test/grafana         latest                          092a480a2531   2 weeks ago    249MB
    grafana/grafana                 latest                          092a480a2531   2 weeks ago    249MB
    prom/prometheus                 latest                          227ae20e1b04   3 weeks ago    193MB
    rancher/hyperkube               v1.21.5-rancher1                327c8c5ff7b8   6 weeks ago    1.9GB
    prom/alertmanager               latest                          ba2b418f427c   2 months ago   57.5MB
    prom/node-exporter              latest                          0fafea149859   2 months ago   21.2MB
    rancher/rke-tools               v0.1.78                         6eeaa0b8da2c   3 months ago   264MB
    rancher/mirrored-coreos-etcd    v3.4.16-rancher1                532c4733c665   5 months ago   83.9MB
    

    [root@VM-16-10-centos harbor]# docker tag prom/node-exporter:latest 10.0.16.10/test/node-exporter:latest
    [root@VM-16-10-centos harbor]# docker push 10.0.16.10/test/node-exporter:latest
    The push refers to repository [10.0.16.10/test/node-exporter]
    7448ad47167c: Pushed
    8d42cad20cac: Pushed
    36b45d63da70: Pushed
    latest: digest: sha256:4f30c76de420097cdc9915c439f5c5f725ccb834a98d0631b3fac1ccb39f96f6 size: 948

    浏览器中查看harbor

     6.拉取镜像

    选中要拉取镜像的仓库,复制pull命令

     

     在服务器上执行pull命令

    [root@VM-16-10-centos harbor]# docker pull 10.0.16.10/test/node-exporter:latest
    latest: Pulling from test/node-exporter
    Digest: sha256:4f30c76de420097cdc9915c439f5c5f725ccb834a98d0631b3fac1ccb39f96f6
    Status: Image is up to date for 10.0.16.10/test/node-exporter:latest
    10.0.16.10/test/node-exporter:latest
  • 相关阅读:
    How to interpret complex C/C++ declarations (ZT)
    The Managed Thread Pool
    How slow is dynamic_cast?
    Type Safety
    sBRDF空间双向反射分布函数完全解析
    近日工作与生活梗概
    简单的环绕散射 Simple Wrap Diffuse From GPU GEMS1
    屈辱史
    难以忽视的细节
    物理学与计算机图形学中的HDR
  • 原文地址:https://www.cnblogs.com/haoee/p/15481112.html
Copyright © 2020-2023  润新知