docker (harbor) 使用

一、推送镜像

docker tag <old-image-name:tag> <new-image-name:tag>

1. docker tag alpine 192.168.159.135/library/alpine

2. docker push 192.168.159.135/library/alpine 

二、镜像同步

(一)

  1. Request URL:

    http://192.168.159.135/api/replication/policies

  2. Request Method:

    POST

  3. Status Code:

    201 Created

  4. Remote Address:

    192.168.159.135:80

  5. Referrer Policy:

    no-referrer-when-downgrade

request playload:

  1. {name: "alpine-test", description: "alpine sync", src_registry: null,…}
    1. deletion: false
    2. description: "alpine sync"
    3. dest_namespace: null
    4. dest_registry: {id: 1, name: "132-harbor", description: "", type: "harbor", url: "http://192.168.159.132",…}
      1. creation_time: "2019-12-26T15:45:05.843352Z"
      2. credential: {type: "basic", access_key: "admin", access_secret: "*****"}
        1. access_key: "admin"
        2. access_secret: "*****"
        3. type: "basic"
      3. description: ""
      4. id: 1
      5. insecure: false
      6. name: "132-harbor"
      7. status: ""
      8. token_service_url: ""
      9. type: "harbor"
      10. update_time: "2019-12-26T15:45:05.843355Z"
      11. url: "http://192.168.159.132"
    5. enabled: true
    6. filters: [{type: "name", value: "library/alpine"}, {type: "tag", value: "latest"}]
      1. 0: {type: "name", value: "library/alpine"}
        1. type: "name"
        2. value: "library/alpine"
      2. 1: {type: "tag", value: "latest"}
        1. type: "tag"
        2. value: "latest"
    7. name: "alpine-test"
    8. override: true
    9. src_registry: null
    10. trigger: {type: "manual", trigger_settings: {cron: ""}}
      1. trigger_settings: {cron: ""}
        1. cron: ""
      2. type: "manual"

(二)

  1. Request URL:

    http://192.168.159.135/api/replication/executions?page=1&page_size=15&policy_id=1

(三)

  1. Request URL:

    http://192.168.159.135/api/replication/executions

  2. Request Method:

    POST

  3. Status Code:

    201 Created

  4. Remote Address:

    192.168.159.135:80

  5. Referrer Policy:

    no-referrer-when-downgrade

REPLY:

  • {policy_id: 1}
  1. policy_id: 1

(四)

  1. Request URL:

    http://192.168.159.135/api/replication/executions?page=1&page_size=15&policy_id=1

  2. Request Method:

    GET

  3. Status Code:

    200 OK

  4. Remote Address:

    192.168.159.135:80

  5. Referrer Policy:

    no-referrer-when-downgrade

(五)

  1. Request URL:

    http://192.168.159.135/api/replication/executions?page=1&page_size=15&policy_id=1

  2. Request Method:

    GET

  3. Status Code:

    200 OK

  4. Remote Address:

    192.168.159.135:80

  5. Referrer Policy:

    no-referrer-when-downgrade

(六)

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值