oras-project / oras

OCI registry client - managing content like artifacts, images, packages
https://oras.land
Apache License 2.0
1.52k stars 181 forks source link

Support showing more information of tags in formatted output #1547

Open FeynmanZhou opened 1 week ago

FeynmanZhou commented 1 week ago

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 within OCI registry. The digest and platform information can be listed alongside the tags in the output.

$ oras repo tags --oci-layout layout-dir --format json
{
  "reference": "localhost:5000/oras@sha256:7414904f07f515f48fe4afeaf876e3151039a81e7177b9c66e9e7ed6dd186111",
  "tags": [
    {
      "tag": "v1"
      "digest": "sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "mediaType": "application/vnd.oci.image.index.v1+json",
      "size": 820
    },
     {
      "tag": "v1-linux-amd64"
      "digest": "sha256:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "size": 200
    },
    {
      "tag": "v1-linux-arm64"
      "digest": "sha256:zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "size": 200
    },
  ]
}

Why is this needed for ORAS?

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