how to use api get image's layers digest #22169
-
how to use api get image's layers digest |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use the Harbor v2 API to retrieve the manifest of an image; the response includes details about the image layers. curl -u admin:Harbor12345 -k https://myharbor/v2/library/harbor-core/manifests/dev |
Beta Was this translation helpful? Give feedback.
You can use the Harbor v2 API to retrieve the manifest of an image; the response includes details about the image layers.
curl -u admin:Harbor12345 -k https://myharbor/v2/library/harbor-core/manifests/dev
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 5450,
"digest": "sha256:f1bdf3ae5ef356228891f505edd58a8a90a7c5fd29fca8a10705101487486490"
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 16313808,
"digest": "sha256:8448683fd5fb8663180725e71cd89bd3542d6a07b7400b3f77ca146b9a3a96b5"
},
{
"mediaType": "application/vnd.docker.i…