如何调用ACR中托管中的图像检查属性

发布于 2025-01-26 00:52:37 字数 476 浏览 5 评论 0 原文

我在ACR中托管的图像很少,我想检查ACR中部署的图像(存储库映像)。

例如,我在“ Test123” ACR中有一个“ Hello-World”图像。我想检查ACR图像并阅读图像的JSON内容。我没有看到任何合适的.NET软件包或.NET SDK库。

如何使用.NET SDK库通过连接Azure容器注册表(ACR)运行“ Docker Image Inspect test123.azurecr.io/hello-world:v3”?

我尝试了关注软件包,但是我没有看到任何支持使用.NET库获得类似命令。

​dotnet/

https://github.com/dotnet/dotnet/dotnet-dotnet-docker

I have few images hosted in ACR, I want to inspect the image (Repository image) deployed in ACR.

For example I have one "hello-world" image in "test123" ACR. I want to inspect ACR image and read the json content of the image. I didn't see any suitable .NET packages or .NET SDK libraries.

how to run "docker image inspect test123.azurecr.io/hello-world:v3" using .NET SDK libraries by connecting AZURE Container Registry (ACR) ?

I have tried following packages, but I didn't see any support to get similar command using .NET Libraries.

https://www.nuget.org/packages/Microsoft.Azure.Management.ContainerService/

https://www.nuget.org/packages/Docker.DotNet/

https://github.com/dotnet/dotnet-docker

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

赤濁 2025-02-02 00:52:37

您可以使用Azure CLI(AZ)。它具有 sustest 命令。

az acr manifest show --registry my-acr --name hello-world:123

You can use the azure cli (az). It has a manifest command.

az acr manifest show --registry my-acr --name hello-world:123
浅唱々樱花落 2025-02-02 00:52:37

最后,我得到了问题的答案。我们可以使用HTTP V2 API功能来检索清单或配置信息以检索。

在下面获取清单信息是URL的

get {url}/v2/{name}/stustests/{referents}
/清单/SHA:25635DFGER4656454FGGF

获取{url}/v2/{name}/blobs/{digest}
https:/ /blobs/sha:4534AFDF3328998956565

注意:有不同的摘要可用于图像。对于清单部分的配置,您将看到一项消化方案。

请在下面找到以下文档

Finally I got answer for my question. We can use Http V2 API capabilities to retrieve Manifest or Config information to retrieve.

To get manifest information below is the URL's

GET {url}/v2/{name}/manifests/{reference}
https://test.azurecr.io/v2/{imageName}/manifests/Sha:25635dfger4656454fggf

GET {url}/v2/{name}/blobs/{digest}
https://test.azurecr.io/v2/{imageName}/blobs/Sha:4534afdf33289988956565

Note: There are different digest's available for image. You will see one digest for entire Manifest and different digest for Config of Manifest section.

Please find below documentation
https://learn.microsoft.com/en-us/rest/api/containerregistry/manifests/get
https://learn.microsoft.com/en-us/rest/api/containerregistry/blob/get

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文