Complete the code to create a basic Azure Container Instance.
az container create --resource-group myResourceGroup --name mycontainer --image [1] --cpu 1 --memory 1.5
The nginx image is a common container image used for web servers and is valid for Azure Container Instances.
Complete the code to expose the container on port 80.
az container create --resource-group myResourceGroup --name mycontainer --image nginx --ports [1]Port 80 is the standard port for HTTP traffic and is commonly used to expose web containers.
Fix the error in the command to restart the container instance.
az container [1] --resource-group myResourceGroup --name mycontainerThe restart command is used to restart an existing Azure Container Instance.
Fill both blanks to define environment variables for the container.
az container create --resource-group myResourceGroup --name mycontainer --image nginx --environment-variables [1]=[2]
Setting environment variable ENVIRONMENT to production is a common practice to configure container behavior.
Fill all three blanks to create a container with a restart policy and CPU count.
az container create --resource-group myResourceGroup --name mycontainer --image nginx --restart-policy [1] --cpu [2] --memory [3]
The Always restart policy ensures the container restarts if it stops. Setting CPU to 2 and memory to 1.5 GB allocates resources appropriately.