skopeo inspect docker://reg.docker.alibaba-inc.com/ray_deploy/alios7u2-min:1.0_nydus_v2
{
"Name": "reg.docker.alibaba-inc.com/ray_deploy/alios7u2-min",
"Digest": "sha256:ce4ddaa7db3e7f1aebde0c91b0d74d096a6777fd1a6af6b4094e6148fda6187d",
"RepoTags": [
"1.0",
"1.0_nydus_v2"
],
"Created": "2021-02-04T07:19:11.851931645Z",
"DockerVersion": "",
"Labels": null,
"Architecture": "amd64",
"Os": "linux",
"Layers": [
// compressed-diff-digest
"sha256:58f95076ebeba2a79f6b786ec216b51c74a6d3ead24c2537ce0f84ae974803c7"
],
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"container=docker"
]
}
skopeo inspect —config docker://reg.docker.alibaba-inc.com/ray_deploy/alios7u2-min:1.0_nydus_v2
{
"created": "2021-02-04T07:19:11.851931645Z",
"architecture": "amd64",
"os": "linux",
"config": {
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"container=docker"
],
"Cmd": [
"/sbin/init"
]
},
"rootfs": {
"type": "layers",
"diff_ids": [
//非压缩的diff-digest,overlay-layers下的目录
"sha256:64ab458946b28f56485b972e599da73f5a7b176ecdf050bb5740c6638c959325"
]
}
}
overlay-images/${imageId}/manifest 存储了该镜像所有layer的 非压缩sha256 和layer大小。
overlay-layers/layers.json 存储了所有layer的 非压缩sha256 、压缩sha256、layer id等信息。layer id就是放在overlay-layers目录下的layer文件名。
images recorded in a registry should be compressed,and ordinarily the compression is accompanied with an update to the MIME type。在本地build镜像时,在本地存储的可能是未压缩的layer文件,它的media type是没有gzip。在docker registry中存储的layer都是压缩过的,压缩完成之后会同时修改media type。上传的layer理论上不应该出现未压缩的layer。
[{
"id": "2d065512630f97ed1172a4de9e654bff7fff0ed2839eec730936ffa21667d048",
"parent": "81ef8397e6bc354f1ad2a223198cc56973de6c1409aa4e31bfe90fd7064037c3",
"created": "2021-08-19T02:53:31.854085322Z",
"compressed-diff-digest": "sha256:afa1907fa2c432a560d72538932a583f39d83efc22874b93996437a986e3bef3",
"compressed-size": 767,
"diff-digest": "sha256:b62b08bf1f2c95a698f60294b87558ed4b700e8e0a0eac037623f986d55d9278",
"diff-size": 4096,
"compression": 2,
"uidset": [
0
],
"gidset": [
0
]
},
{
"id": "a3e9bebf7bd6361b1dd92ecf6f2b77c0ece19a4ddcb73198df0a97f1a1af7578",
"parent": "ed42d543fba087bf0262c7c2c0a37d2ced7d6410afcf9e43ed648904b9e4c94e",
"created": "2021-08-19T02:53:41.907387302Z",
"compressed-diff-digest": "sha256:5105d5ae3df1768750d351f890511fe751dea205b6e89a6d0cacd0efd8a08b2f",
"compressed-size": 75776,
"diff-digest": "sha256:5105d5ae3df1768750d351f890511fe751dea205b6e89a6d0cacd0efd8a08b2f",
"diff-size": 75776,
"uidset": [
0
],
"gidset": [
0
]
},
{
"id": "fb0a6af74b7c351d8a960405076ce6001f427b9081f38b932f575b041abd89c4",
"parent": "bf2f9f80a90ab5a5a78ee6a4486498f383c5438a6c85e69784d1b5aa526506bc",
"created": "2021-08-19T02:53:35.899785835Z",
"compressed-diff-digest": "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"compressed-size": 1024,
"diff-digest": "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"diff-size": 1024
}]