Containers (1 / 61): If you're developing a Linux-based ASP.NET Core application that is planned to be deployed via Azure Container Instances, and you need to launch it in a geographic region where your company doesn't have an existing resource group, what sequence of Azure CLI commands would you utilize to correctly deploy your application in that target region?
location="West Europe"
resourceGroup="WEurope"
containerGroup="WEuropeGroup"
containerName="AspContainer"
containerImage="mcr.microsoft.com/azuredocs/aci-helloworld"
# Code here
Answer:
location="West Europe"
resourceGroup="WEurope"
containerGroup="WEuropeGroup"
containerName="AspContainer"
containerImage="mcr.microsoft.com/azuredocs/aci-helloworld"
# Create a new resource group in the West Europe region
az group create --name $resourceGroup --location "$location"
# Create a container group (ACI) in the new resource group
az container create --name $containerName --resource-group $resourceGroup --image $containerImage --dns-name-label $containerGroup --location $location