简体   繁体   English

更新基本映像时,如何更新 azure 容器注册表中的所有映像

[英]How can I update all images in azure container registry when base image is updated

I have a bunch of repositories in an Azure container registry.我在 Azure 容器注册表中有一堆存储库。 Each repository can have several versions of an image, tagged like this, imagename:v_1_0 or imagename:v_1_2.每个存储库可以有多个版本的图像,标记如下,imagename:v_1_0 或 imagename:v_1_2。 Almost all of these images uses the base image mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim.几乎所有这些映像都使用基础映像 mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim。

My question is, how do I create an acr task that updates all of my images when that base image is updated by microsoft?我的问题是,当微软更新基本图像时,如何创建一个更新我所有图像的 acr 任务? I have seen tutorials on creating an acr task but almost all of them assume that the source code is pushed from github and that I am only updating a single image.我看过有关创建 acr 任务的教程,但几乎所有教程都假定源代码是从 github 推送的,并且我只更新单个图像。 I would like to avoid creating a task for n number of images in each repository but I suppose I could create a job that automatically creates a task whenever I publish from visual studio.我想避免在每个存储库中为 n 个图像创建任务,但我想我可以创建一个作业,每当我从 Visual Studio 发布时自动创建一个任务。

Has anyone else solved this problem?有没有其他人解决过这个问题?

So, if you are building your images via ACR tasks they do that automatically for the following base images:因此,如果您通过 ACR 任务构建图像,它们会自动为以下基本图像执行此操作:

  1. The same Azure container registry where the task runs任务运行的同一个 Azure 容器注册表
  2. Another private Azure container registry in the same or a different region同一或不同区域的另一个私有 Azure 容器注册表
  3. A public repo in Docker Hub Docker Hub 中的公共仓库
  4. A public repo in Microsoft Container Registry Microsoft Container Registry 中的公共存储库

https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tasks-base-images#base-image-notifications https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tasks-base-images#base-image-notifications

if you are building them outside of ACR and pushing to ACR - you probably need to handle that in the same place you are building them.如果您在 ACR 之外构建它们并推送到 ACR - 您可能需要在构建它们的同一个地方处理它。 ACR cant do that for images its not building (seems fair).对于未构建的图像,ACR 无法做到这一点(似乎很公平)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 Azure 容器注册表中的映像创建 Dockerfile? - How can I create a Dockerfile FROM an Image in Azure Container Registry? Azure Container Registry - 删除除 2 之外的所有镜像 - Azure Container Registry - delete all images except 2 我无法在Azure容器注册表中选择图像 - I can't choose image in Azure Container Registry 如何为 Azure 容器注册表编写 docker 映像开发以暂存升级脚本? - How can I write a docker image dev to stage promotion script for Azure container registry? Azure:如何找到容器注册表的所有者或资源 ID? - Azure: How can I find the owner or resource ID of a container registry? 如何从 Azure 容器注册表中删除映像 - How to delete image from Azure Container Registry 通过 Golang 列出所有 Azure 容器注册表镜像 - List all Azure container registry images via Golang Azure Static WebApp 可以从 Azure Container Registry 拉取镜像吗? - Can Azure Static WebApp pull an image from Azure Container Registry? 使用 K3s 时如何从 Azure Container Registry 中拉取镜像? - How to pull images from Azure Container Registry when using K3s? 使用 Az CLI 创建新的 Azure 容器实例时,无法从私有 Azure 容器注册表中提取映像 - Can't pull image from private Azure Container Registry when using Az CLI to create a new Azure Container Instance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM