容器入門(3) - skopeo

Skopeo是用來對Registry的Images操作的,主要功能包括:

  1. 查看Registry上的Image信息。
$ skopeo inspect docker://registry.domain.com:5000/busybox:latest
{
    "Name": "registry.domain.com:5000/busybox",
    "Digest": "sha256:a6b9238ceed3894db3327cfe00672971b799ed6ade8dce3637c6dce007863fec",
    "RepoTags": [
        "latest"
    ],
    "Created": "2020-06-29T20:21:41.42102751Z",
    "DockerVersion": "18.09.7",
    "Labels": null,
    "Architecture": "amd64",
    "Os": "linux",
    "Layers": [
        "sha256:74f990a74a8f68958f7ad85ecb9cd091670a0cc4b8560f7ac0712d057052cf84"
    ],
    "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ]
}
  1. 在2個Registry之間複製Image。
$ skopeo copy docker://quay.io/buildah/stable docker://registry.domain.com:5000/buildah
Getting image source signatures
Copying blob 369a1989bb0c done
Copying blob a5b63bb008e8 done
Copying blob 756a6ab6d2f5 done
Copying blob 03c837e31708 done
Copying blob 1b9ca1b83456 done
Copying config 5ab6da8e5b done
Writing manifest to image destination
Storing signatures

$ curl -u user1:password1 https://${REGISTRY_DOMAIN}:5000/v2/_catalog
{"repositories":["buildah","busybox"]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章