Skip to content

Support showing more information of "oras repo tags" in formatted output #1547

@FeynmanZhou

Description

@FeynmanZhou

What is the version of your ORAS CLI

v1.2.0

What would you like to be added?

When listing the tags in an OCI image layout or an repo of the OCI registry. The corresponding digest and mediatype of each tagged manifest should be listed alongside the tags in the output.

$ oras repo tags registry.k8s.io/busybox --format json

{
    "child": [],
    "manifest": {
        "sha256:4bdd623e848417d96127e16037743f0cd8b528c026e9175e22a84f639eca58ff": {
            "mediaType": "application/vnd.docker.distribution.manifest.v1+prettyjws",
            "tag": [
                "1.24"
            ],
            "timeUploadedMs": "1660289007063",
            "timeCreatedMs": "0",
            "imageSizeBytes": "0"
        },
        "sha256:545e6a6310a27636260920bc07b994a299b6708a1b26910cfefd335fdfb60d2b": {
            "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
            "tag": [
                "1.27",
                "1.27.2"
            ],
            "timeUploadedMs": "1660289009344",
            "timeCreatedMs": "1505297656620",
            "imageSizeBytes": "693833"
        },
        "sha256:d8d3bc2c183ed2f9f10e7258f84971202325ee6011ba137112e01e30f206de67": {
            "mediaType": "application/vnd.docker.distribution.manifest.v1+prettyjws",
            "tag": [
                "latest"
            ],
            "timeUploadedMs": "1660289016474",
            "timeCreatedMs": "0",
            "imageSizeBytes": "0"
        }
    },
    "name": "k8s-artifacts-prod/images/busybox",
    "tags": [
        "1.24",
        "1.27",
        "1.27.2",
        "latest"
    ]
}

Why is this needed for ORAS?

  • With the media type of each tag showing in the formatted output, users should be able to differentiate from an image index and image manifest in a repo
  • Easier to users to list all available tags with their descriptor in a repo, so that users can compose an image index by selecting from a few arch-specific tags
  • For scripting and automation scenario

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Metadata

Metadata

Assignees

Labels

duplicateThis issue or pull request already existsenhancementNew feature or requestexperimentalIssues or pull requests depending on WIP specs

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions