Automating ACR Image Updates from Docker Hub
You have an Azure subscription that contains an Azure DevOps pipeline and an Azure Repos repository. The pipeline performs the following actions: • Builds a custom container image by using a base image stored in a public Docker Hub repository • Stores the custom container image in Azure Container Registry • Deploys the custom container image to Azure Container Apps The pipeline is triggered by commits to the Azure Repos repository. You need to ensure that when the base image in Docker Hub is updated, the custom image in Azure Container Registry is updated automatically. The solution must minimize administrative effort. What should you include in the solution?
Community Insight
The core concept is automating CI/CD triggers for dependency updates; the common trap is over-engineering with general-purpose automation tools like Azure Automation or Functions instead of using native registry features.
This question explores how to minimize administrative effort when updating custom container images based on upstream base image changes. The correct approach leverages Azure Container Registry (ACR) Tasks for automated trigger-based builds.
Candidates often select 'an Azure DevOps pipeline task' because they are familiar with the existing pipeline, but managing external webhooks and polling logic manually increases administrative overhead significantly compared to native ACR capabilities.
Community Discussion (1 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Azure Container Registry (ACR) Tasks provides a built-in feature called 'Image Trigger' or 'Base Image Update'. This allows you to configure ACR to automatically build an image whenever the underlying base image in a public repository (like Docker Hub) is updated. Since the scenario requires minimizing administrative effort and handling external triggers without maintaining complex webhook receivers, ACR Tasks is the ideal, managed solution.Why the Other Options Are Wrong
An Azure Automation runbook or an Azure Function would require writing custom code to poll Docker Hub or listen to webhooks, which contradicts the 'minimize administrative effort' requirement. An Azure DevOps pipeline task can be triggered by commits, but it does not natively support triggering solely on external base image updates without additional infrastructure setup, making it more labor-intensive than ACR's native automation.Community Comment Notes
Community consensus strongly supports ACR Tasks as the standard method for this specific pattern. As one user noted, this follows the 'OS & Framework Patching Pattern' where native automation hooks are preferred over custom scripts to handle security patches efficiently.Exam Strategy
Always look for managed services that offer out-of-the-box automation for cloud-native patterns before considering general-purpose compute or automation resources. For container lifecycle management, check ACR features first.
Frequently Asked Questions
Why not use Azure DevOps pipelines for this?
DevOps pipelines are excellent for commit-triggered builds but require extra configuration to detect external base image changes, increasing admin effort compared to native ACR triggers.
Can ACR Tasks pull from private registries?
Yes, ACR Tasks supports pulling from private registries using service principals or managed identities, though this question specifies a public Docker Hub source.
Related Analysis
Practice All AZ-305 Questions
Access 95 questions with complete answers and detailed explanations.
View Full AZ-305 Practice Test →