AZ-801 · Question #81
You have a server named Server1 that runs Windows Server and has the Web Server (IIS) server role installed. Server1 hosts an ASP.NET Core web app named WebApp1 and the app's source files. You install
This question tests the end-to-end workflow for containerizing an ASP.NET Core application on a local server and deploying it to Azure App Service via Azure Container Registry (ACR). It focuses on the Docker image build-tag-push pipeline and ACR integration with App Service.
Question
Explanation
This question tests the end-to-end workflow for containerizing an ASP.NET Core application on a local server and deploying it to Azure App Service via Azure Container Registry (ACR). It focuses on the Docker image build-tag-push pipeline and ACR integration with App Service.
Approach. The correct three-step sequence is: (1) Create a Dockerfile in the WebApp1 source directory - this defines the base image (e.g., mcr.microsoft.com/dotnet/aspnet), build steps, and entry point for the containerized app. (2) Build and push the Docker image to Azure Container Registry - this involves running 'docker build' to create the image, logging into ACR with 'az acr login' or 'docker login <registry>.azurecr.io', tagging the image with the ACR fully qualified name, and executing 'docker push' to upload it. (3) Configure an Azure App Service (Linux, container-based) to pull its deployment image from the ACR repository - this links App Service to ACR by specifying the registry URL, image name, and credentials (often using a Managed Identity or ACR admin credentials), enabling continuous deployment from the registry.
Concept tested. Container-based Azure deployment pipeline: creating a Dockerfile for an ASP.NET Core app, building and publishing a Docker image to Azure Container Registry, and configuring Azure App Service (Web App for Containers) to deploy from that registry.
Reference. Microsoft Learn - 'Deploy a custom container to App Service using GitHub Actions' and 'Push your first image to your Azure container registry using the Docker CLI' (docs.microsoft.com/azure/container-registry, docs.microsoft.com/azure/app-service/tutorial-custom-container)
Topics
Community Discussion
No community discussion yet for this question.