Azure / azure-cli

Azure Command-Line Interface
MIT License
3.98k stars 2.96k forks source link

az acr repository show-manifests --detail #16855

Open sbyrnes-weblogix opened 3 years ago

sbyrnes-weblogix commented 3 years ago

This is autogenerated. Please review and update as needed.

Describe the bug

az acr repository show-manifests --detail does not return the same manifest data as what is shown in portal.

Command Name `` az acr repository show-manifests -n weblogixtest --repository nginx --detail

Errors:

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Would expect to see the detailed manifest for the image/tag as what is shown in the portal.

{ "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/vnd.docker.container.image.v1+json", "size": 7463, "digest": "sha256:b9e1dc12387ae52eee5da783128deb8bdee0dc3b29fc3874cd81cf2190f71099" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 27108069, "digest": "sha256:a076a628af6f7dcabc536bee373c0d9b48d9f0516788e64080c4e841746e6ce6" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 26468819, "digest": "sha256:45d7b5d3927df5b2939f5caad6115d3f3bcb914846255bc4800c7baceb500691" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 601, "digest": "sha256:5e326fece82e18449f9f3b56f38dbcbaa1f92dffd7b88d2d560e6208d62bb063" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 903, "digest": "sha256:30c386181b689e0ec7e2bbde4d312decd39b1e28158f12b6d1c02a730a8f6c24" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 666, "digest": "sha256:b15158e9ebbec109b3c4541fcfb2c3fe3ce7f9efba6ca98abb9708349ed9b63f" } ] }

Environment Summary

Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.29
Python 3.8.5
Shell: bash

azure-cli 2.0.81

Extensions:
azure-devops 0.17.0

Additional Context

sbyrnes-weblogix commented 3 years ago

From the API I can call out to curl -X GET -H "Authorization: Bearer $TOKEN" -H "Content-Type:application/json" -H "Accept:application/vnd.oci.image.manifest.v1+json;q=0.4, application/vnd.docker.distribution.manifest.v2+json;q=0.5, application/vnd.docker.distribution.manifest.list.v2+json;q=0.6" https://weblogixtest.azurecr.io/v2/nginx/manifests/stable And this allows me to fetch the info, but would be much easier if it was exposed via the az acr command space

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-MSFT.

Issue Details
### **This is autogenerated. Please review and update as needed.** ## Describe the bug az acr repository show-manifests --detail does not return the same manifest data as what is shown in portal. **Command Name** `` az acr repository show-manifests -n weblogixtest --repository nginx --detail **Errors:** ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - _Put any pre-requisite steps here..._ - `` az acr repository show-manifests -n weblogixtest --repository nginx --detail ## Expected Behavior Would expect to see the detailed manifest for the image/tag as what is shown in the portal. { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/vnd.docker.container.image.v1+json", "size": 7463, "digest": "sha256:b9e1dc12387ae52eee5da783128deb8bdee0dc3b29fc3874cd81cf2190f71099" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 27108069, "digest": "sha256:a076a628af6f7dcabc536bee373c0d9b48d9f0516788e64080c4e841746e6ce6" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 26468819, "digest": "sha256:45d7b5d3927df5b2939f5caad6115d3f3bcb914846255bc4800c7baceb500691" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 601, "digest": "sha256:5e326fece82e18449f9f3b56f38dbcbaa1f92dffd7b88d2d560e6208d62bb063" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 903, "digest": "sha256:30c386181b689e0ec7e2bbde4d312decd39b1e28158f12b6d1c02a730a8f6c24" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 666, "digest": "sha256:b15158e9ebbec109b3c4541fcfb2c3fe3ce7f9efba6ca98abb9708349ed9b63f" } ] } ## Environment Summary ``` Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.29 Python 3.8.5 Shell: bash azure-cli 2.0.81 Extensions: azure-devops 0.17.0 ``` ## Additional Context
Author: sbyrnes-weblogix
Assignees: -
Labels: `Container Registry`, `Service Attention`, `needs-triage`, `question`
Milestone: -
yonzhan commented 3 years ago

acr

yugangw-msft commented 3 years ago

For this we might need to expose --detail from az acr repository show. Let us wait for for votes from community

justinbowes commented 3 years ago

+1 from me. It is definitely surprising that az acr repository show-manifests does not return Docker manifests.

tot0 commented 3 years ago

I think adding --detail to az acr repository show makes sense, more detailed info about an --image would include the actual Image manifest, not just the manifest digest.

ggirard07 commented 3 years ago

This is probably out of scope, but adding actual image manifest data like labels could be really helpful too! My principal use case is looking up an image by matching labels applied by build pipeline on it, without having to pull each images.

@sbyrnes-weblogix Do you have any easy solution to redeem a token from /oauth/token with proper scope from refresh_token exposed by az acr login?

m1o1 commented 3 years ago

Same, I was trying to figure out how to get access to the "layers" in a repository in my ACR. Except in my case it's a helm chart (OCI) not a docker image, though I still want to see the layers. Looking at the requests made in the portal, it seems it requests the /v2/{repository}/manifests/{tag} endpoint to get this data, but I don't see any az acr command that can get the same.

NithyaRKumar commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-msft.

Could you kindly let us know whether this issue is fixed with "az acr repository show-manifest" command?

rodrigosantosms commented 1 year ago

@yugangw-msft

toddysm commented 1 year ago

Changing the assignment to @northtyphoon and @terencet-dev