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

(六)

 

 

 

發佈了95 篇原創文章 · 獲贊 12 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章