一、推送镜像
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
二、镜像同步
(一)
-
Request URL:
http://192.168.159.135/api/replication/policies
-
Request Method:
POST
-
Status Code:
201 Created
-
Remote Address:
192.168.159.135:80
-
Referrer Policy:
no-referrer-when-downgrade
request playload:
- {name: "alpine-test", description: "alpine sync", src_registry: null,…}
- deletion: false
- description: "alpine sync"
- dest_namespace: null
- dest_registry: {id: 1, name: "132-harbor", description: "", type: "harbor", url: "http://192.168.159.132",…}
- creation_time: "2019-12-26T15:45:05.843352Z"
- credential: {type: "basic", access_key: "admin", access_secret: "*****"}
- access_key: "admin"
- access_secret: "*****"
- type: "basic"
- description: ""
- id: 1
- insecure: false
- name: "132-harbor"
- status: ""
- token_service_url: ""
- type: "harbor"
- update_time: "2019-12-26T15:45:05.843355Z"
- url: "http://192.168.159.132"
- enabled: true
- filters: [{type: "name", value: "library/alpine"}, {type: "tag", value: "latest"}]
- 0: {type: "name", value: "library/alpine"}
- type: "name"
- value: "library/alpine"
- 1: {type: "tag", value: "latest"}
- type: "tag"
- value: "latest"
- 0: {type: "name", value: "library/alpine"}
- name: "alpine-test"
- override: true
- src_registry: null
- trigger: {type: "manual", trigger_settings: {cron: ""}}
- trigger_settings: {cron: ""}
- cron: ""
- type: "manual"
- trigger_settings: {cron: ""}
(二)
-
Request URL:
http://192.168.159.135/api/replication/executions?page=1&page_size=15&policy_id=1
(三)
-
Request URL:
http://192.168.159.135/api/replication/executions
-
Request Method:
POST
-
Status Code:
201 Created
-
Remote Address:
192.168.159.135:80
-
Referrer Policy:
no-referrer-when-downgrade
REPLY:
- {policy_id: 1}
- policy_id: 1
(四)
-
Request URL:
http://192.168.159.135/api/replication/executions?page=1&page_size=15&policy_id=1
-
Request Method:
GET
-
Status Code:
200 OK
-
Remote Address:
192.168.159.135:80
-
Referrer Policy:
no-referrer-when-downgrade
(五)
-
Request URL:
http://192.168.159.135/api/replication/executions?page=1&page_size=15&policy_id=1
-
Request Method:
GET
-
Status Code:
200 OK
-
Remote Address:
192.168.159.135:80
-
Referrer Policy:
no-referrer-when-downgrade
(六)