我在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
发布评论
评论(2)
您可以使用Azure CLI(AZ)。它具有 sustest 命令。
You can use the azure cli (az). It has a manifest command.
最后,我得到了问题的答案。我们可以使用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