Skip to content

Conversation

@cpuguy83
Copy link
Member

OCI added support for a data field in a descriptor. This field is expected to contain the content being pointed to by the descriptor.

As an example of this see: docker.io/tianon/true@sha256:434c266719c0dc4e936294efa36f66aed4f50a414ea495a234dce16454153478

{
        "config": {
                "data": "ewoJImFyY2hpdGVjdHVyZSI6ICJhbWQ2NCIsCgkiY29uZmlnIjogewoJCSJDbWQiOiBbCgkJCSIvdHJ1ZSIKCQldCgl9LAoJImNyZWF0ZWQiOiAiMjAxNC0wMS0yNVQyMzoxMTowOVoiLAoJImhpc3RvcnkiOiBbCgkJewoJCQkiY3JlYXRlZCI6ICIyMDE0LTAxLTI1VDIzOjExOjA5WiIsCgkJCSJjcmVhdGVkX2J5IjogIm5hc20gLW8gL3RydWUgaHR0cHM6Ly9naXRodWIuY29tL3RpYW5vbi9kb2NrZXJmaWxlcy9ibG9iLzRhMWRkMjM0ZmEyZTY3MWM5MjljMDk5Mjk3MDliZjMzYWZmZGM1OTcvdHJ1ZS90cnVlLmFzbSIKCQl9CgldLAoJIm9zIjogImxpbnV4IiwKCSJyb290ZnMiOiB7CgkJImRpZmZfaWRzIjogWwoJCQkic2hhMjU2OjBmZjNiOTFiZGYyMWVjZGYyZjJmM2Q0MzcyYzIwOThhMTRkYmUwNmNkNjc4ZThmMGE4NWZkNDkwMmQwMGUyZTIiCgkJXSwKCQkidHlwZSI6ICJsYXllcnMiCgl9Cn0K",
                "digest": "sha256:a181593bfa4535abc8b6ee849bb4d7ba67ac80487285b29ff30f5f1f4040ff24",
                "mediaType": "application/vnd.oci.image.config.v1+json",
                "size": 453
        },
        "layers": [
                {
                        "data": "H4sIAAAAAAAA/yopKk1loDEwMDQwMDc3ZTCAAHTawNDchMHQxNjMzMTI2MDECKTe0MyIQcGA1g4DgdLiksQiBgOK7UL33BAB9a4+bkyMjHA+E4MdA4hXweAA5jtg0ePAYMEA0wGiWdFkkekaKK8GLq8AJjfY8LNS0RujYBSMglEwCkgEgAAAAP//MqdJrQAIAAA=",
                        "digest": "sha256:46e21c7cfe177aec58c290f7a47589897415c5ce1f64acf4485ef267813f396c",
                        "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
                        "size": 146
                }
        ],
        "mediaType": "application/vnd.oci.image.manifest.v1+json",
        "schemaVersion": 2
}

With this change there is no need to fetch either the config or the layer because the data is already in the manifest.

ref: opencontainers/image-spec#826

@cpuguy83 cpuguy83 requested a review from dmcgowan February 10, 2023 00:41
@cpuguy83 cpuguy83 force-pushed the use_data_in_descriptor branch from 0c3c4e3 to 265ea8e Compare February 10, 2023 00:43
Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a maintainer, but very interested and this looks pretty solid to me 👀

@cpuguy83 cpuguy83 force-pushed the use_data_in_descriptor branch from 265ea8e to e3deb69 Compare February 10, 2023 01:10
OCI added support for a `data` field in a descriptor.
This field is expected to contain the content being pointed to by the
descriptor.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the use_data_in_descriptor branch from e3deb69 to 13652e0 Compare February 10, 2023 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants