skopeo sync --src docker --dest docker addr1/library/nginx addr2/library/ --src-tls-verify=false --dest-tls-verify=false
Getting image source signatures
Copying blob a9edb18cadd1 skipped: already exists
Copying blob 186b1aaa4aa6 skipped: already exists
Copying blob b4df32aa5a72 skipped: already exists
Copying blob a2abf6c4d29d [--------------------------------------] 0.0b / 0.0b
Copying blob b351033042d5 done
Copying blob a0bcbecc962e [--------------------------------------] 0.0b / 0.0b
Copying blob 589b7251471a skipped: already exists
Copying config 4b32d790cb done
Writing manifest to image destination
Storing signatures
INFO[0006] Synced 2 images from 1 sources
上面的的例子是harbor2.0 同步到1.0
addr1和addr2分别为仓库地址。/library/nginx 为repo, /library/ 为project
注意同步前需要登录,
skopeo login
本地镜像上传至仓库中:
skopeo copy --src-daemon-host unix:///var/run/docker.sock docker-daemon:ubuntu:20.10 docker://192.168.100.194:443/library/ubuntu:20.10 --dest-tls-verify=false
Getting image source signatures
Copying blob c7b30e8af03a done
Copying config e508bd6d69 done
Writing manifest to image destination
Storing signatures