0
0
Azurecloud~10 mins

Why containers on Azure matter - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a basic Azure Container Instance.

Azure
az container create --resource-group myResourceGroup --name mycontainer --image [1] --cpu 1 --memory 1.5
Drag options to blanks, or click blank then click option'
Anginx
Bmyapp
Cazure
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-existent or invalid image name.
Confusing resource group or container names with image names.
2fill in blank
medium

Complete the code to expose the container on port 80.

Azure
az container create --resource-group myResourceGroup --name mycontainer --image nginx --ports [1]
Drag options to blanks, or click blank then click option'
A443
B22
C80
D8080
Attempts:
3 left
💡 Hint
Common Mistakes
Using SSH port 22 instead of HTTP port 80.
Using HTTPS port 443 when the container is not configured for SSL.
3fill in blank
hard

Fix the error in the command to restart the container instance.

Azure
az container [1] --resource-group myResourceGroup --name mycontainer
Drag options to blanks, or click blank then click option'
Arestart
Bstop
Cdelete
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' which tries to make a new container.
Using 'delete' which removes the container.
Using 'stop' which only stops but does not restart.
4fill in blank
hard

Fill both blanks to define environment variables for the container.

Azure
az container create --resource-group myResourceGroup --name mycontainer --image nginx --environment-variables [1]=[2]
Drag options to blanks, or click blank then click option'
AENVIRONMENT
Bproduction
Cdevelopment
DVERSION
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping variable name and value.
Using unrelated variable names.
5fill in blank
hard

Fill all three blanks to create a container with a restart policy and CPU count.

Azure
az container create --resource-group myResourceGroup --name mycontainer --image nginx --restart-policy [1] --cpu [2] --memory [3]
Drag options to blanks, or click blank then click option'
AAlways
B2
C1.5
DNever
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Never' restart policy which stops automatic restarts.
Setting CPU or memory to zero or invalid values.