清单文件中的 GraphDriver 和 RootFS 条目

清单文件中的 GraphDriver 和 RootFS 条目

当镜像被推送到 Docker 寄存器时,每个镜像层的内容都会被压缩,然后将相应的摘要(SHA-256)放入清单文件中。

存储库的清单文件redis包含以下条目:

        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/bd512eb256c8aa56cbe9243d440a311820712d1a245fe6f523d39d19cd6c862d/diff:/var/lib/docker/overlay2/7fa1e90f35c78fc83c3a
4b86e36e45d742383b394adf9ce4cf9b339d919c9cbe/diff:/var/lib/docker/overlay2/2c1869386b5b8542959da4f0173a5272b9703326d619f27258b4edff7a1dbbf9/diff:/var/lib/docker/overlay2
/23ba3955c5b72ec17b9c409bd5233a3d92cbd75543c7d144b364f8188765788e/diff:/var/lib/docker/overlay2/87d8a92919103e8ff723221200acb36e17c611fa499571ab183d0f51458e6f24/diff",
                "MergedDir": "/var/lib/docker/overlay2/e503ed41978e99fe9b71a4225763a40b7988e9a4f31d4c06ef1ec1af46b0b6ab/merged",
                "UpperDir": "/var/lib/docker/overlay2/e503ed41978e99fe9b71a4225763a40b7988e9a4f31d4c06ef1ec1af46b0b6ab/diff",
                "WorkDir": "/var/lib/docker/overlay2/e503ed41978e99fe9b71a4225763a40b7988e9a4f31d4c06ef1ec1af46b0b6ab/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:6270adb5794c6987109e54af00ab456977c5d5cc6f1bc52c1ce58d32ec0f15f4",
                "sha256:f99f83132c0a553c6444af96c9f8b905bf1e12835f4f1fa1aa67e9b39b461b1b",
                "sha256:03eafa7928765518eb3d5f2bd2bd97dac655833dd088db9e7590eadbb721aa72",
                "sha256:dc5ef0c854b450e002c49b8d3dad8a70b7d70a695f59104d6dea0bb87582baa2",
                "sha256:4c8e44b308d0a525ccda8da176d6daaa6c117c87148ae85396a8171e6996f9f4",
                "sha256:76c5d4259e40d4282ba496be18926dcef62063f99eb463ed2d802dd9a0e303a0"
            ]
        },

这是一个 6 层图像。

GraphDriver.Data.LowerDir指的是存储在本地registry中的各层的非压缩内容hash(digest)( /var/lib/docker/overlay2)

摘要RootFS指的是什么?它是每个镜像层的压缩内容(在 dockerhub 注册表中)的摘要吗?


相关内容