zoukankan      html  css  js  c++  java
  • harbor的日常管理

    有情提示:docker-compose需要在 docker-compose.yml 存放的目录下执行。

    1、Stopping Harbor:

    #docker-compose stop
    Stopping nginx ... done
    Stopping harbor-jobservice ... done
    Stopping harbor-ui ... done
    Stopping harbor-db ... done
    Stopping registry ... done
    Stopping harbor-log ... done
    

    2、Restarting Harbor after stopping:

    #docker-compose start
    Starting log ... done
    Starting ui ... done
    Starting mysql ... done
    Starting jobservice ... done
    Starting registry ... done
    Starting proxy ... done
    

    3、To change Harbor's configuration, first stop existing Harbor instance and update harbor.cfg.
    Then run prepare script to populate the configuration. Finally re-create and start Harbor's instance:

    # docker-compose down
    # vim harbor.cfg
    # ./prepare
    # docker-compose up -d
    

    4、Removing Harbor's containers while keeping the image data and Harbor's database files on the file system:

    # docker-compose down
    

    5、Removing Harbor's database and image data (for a clean re-installation):

    # rm -r /data/database
    # rm -r /data/registry
    

    6、修改监听端口(默认监听80端口)

    Configuring Harbor listening on a customized port.

    By default, Harbor listens on port 80(HTTP) and 443(HTTPS, if configured) for both admin portal and docker commands, you can configure it with a customized one.

    For HTTP protocol

    6.1、Modify docker-compose.yml,Replace the first "80" to a customized port, e.g. 8888:80.

    # vim docker-compose.yml
    
    proxy:
      image: library/nginx:1.11.5
      restart: always
      volumes:
        - ./config/nginx:/etc/nginx
      ports:
        - 8888:80
        - 443:443
      depends_on:
        - mysql
        - registry
        - ui
        - log
      logging:
        driver: "syslog"
        options:  
          syslog-address: "tcp://127.0.0.1:1514"
          tag: "proxy"
    

    6.2、Modify harbor.cfg, add the port to the parameter "hostname".

    # vim harbor.cfg
    
    hostname = 10.90.5.105:8888
    

    6.3、Re-deploy Harbor refering to previous section.

    # docker-compose down
    # ./prepare
    # docker-compose up -d
    
  • 相关阅读:
    js 99乘法表
    微信小程序 富文本插件 循环渲染方式
    Mysql: mysqlbinlog命令查看日志文件
    Java Mail 发送邮件(SSL加密方式,TSL加密方式)
    进程和线程的区别
    Java 制作证书(Windows 和Linux)
    Linux 常用命令标记
    Java clone克隆方法 --深拷贝--浅拷贝 --原型模型
    tomcat内存溢出:PermGen space解决方法
    Java 多线程 ---- 线程中this与 Thread.currentThread()线程的区别
  • 原文地址:https://www.cnblogs.com/keithtt/p/7028986.html
Copyright © 2011-2022 走看看