You are preparing to deploy a Python website to an Azure Web App using a container. The solution will use multiple containers in the same container group. The
Dockerfile that builds the container is as follows:
FRoM python: 3
ADD website. py
" . /website. py"J
CMD [ "python" ,
You build a container by using the following command. The Azure Container Registry instance named images is a private registry.
docker build —t images . azurecr .io/website:vI.O. O
The user name and password for the registry is admin.
The Web App must always run the same version of the website regardless of future builds.
You need to create an Azure Web App to run the website.
How should you complete the commands? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
Assistant
To create an Azure Web App to run the website, you will need to:
Push the Docker image to Azure Container Registry using the credentials (admin and 密码) provided.
Create the Web App using the appropriate container settings to ensure the Docker image is used.
Here are the steps and corresponding commands to achieve this:
az webapp config container set --name <WebAppName> --resource-group <ResourceGroupName> --docker-registry-server-url https://images.azurecr.io --docker-registry-server-user admin --docker-registry-server-password <password>
If plan and resource group names are consistent everywhere, and matching your specific requirements, these commands will create the required Azure Web App and ensure it is always running the specified Docker image (v1.0.0).
Make sure to replace <ResourceGroupName>, <Location>, <AppServicePlanName>, <WebAppName>, <password> with your actual values.