Search code examples
azuredocker.net-coreazure-deploymentazure-container-registry

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. Each repository can have several versions of an image, tagged like this, imagename:v_1_0 or imagename:v_1_2. Almost all of these images uses the base image 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? 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. 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.

Has anyone else solved this problem?


Solution

  • So, if you are building your images via ACR tasks they do that automatically for the following base images:

    1. The same Azure container registry where the task runs
    2. Another private Azure container registry in the same or a different region
    3. A public repo in Docker Hub
    4. A public repo in Microsoft Container Registry

    https://learn.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 cant do that for images its not building (seems fair).