0
0
Azurecloud~20 mins

ACR image building and pushing in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
ACR Image Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when you push a Docker image to Azure Container Registry (ACR)?

You have built a Docker image locally and pushed it to your Azure Container Registry. What is the expected behavior after the push completes successfully?

AThe image is converted to a virtual machine image in Azure.
BThe image is automatically deployed to all Azure Kubernetes Service clusters.
CThe image is deleted from the local machine after pushing.
DThe image is stored in ACR and can be pulled by authorized clients.
Attempts:
2 left
💡 Hint

Think about what a container registry's role is in storing images.

Configuration
intermediate
2:00remaining
Which Azure CLI command builds and pushes an image to ACR in one step?

You want to build a Docker image from your local Dockerfile and push it directly to your Azure Container Registry using Azure CLI. Which command achieves this?

Aaz acr build --registry MyRegistry --image myapp:v1 .
Baz acr push --registry MyRegistry --image myapp:v1 .
Caz acr create --name MyRegistry --image myapp:v1 .
Daz acr deploy --registry MyRegistry --image myapp:v1 .
Attempts:
2 left
💡 Hint

Look for the command that builds and pushes in one step.

security
advanced
2:00remaining
What is the best practice to securely push images to ACR from a CI/CD pipeline?

You want to push Docker images to Azure Container Registry from your CI/CD pipeline securely without exposing credentials. Which approach is best?

AUse a service principal with minimum required permissions and store its credentials securely in the pipeline.
BUse your personal Azure account credentials directly in the pipeline scripts.
CAllow anonymous push access to the registry during the pipeline run.
DEmbed the registry admin username and password in the Dockerfile.
Attempts:
2 left
💡 Hint

Consider least privilege and secure credential storage.

Architecture
advanced
2:00remaining
How to optimize image build and push speed for large images in ACR?

You have large container images that take a long time to build and push to Azure Container Registry. Which architectural choice improves build and push speed?

APush images without tagging to reduce metadata overhead.
BUse Azure Container Registry Tasks with incremental builds and caching enabled.
CUse multiple registries in different regions and push all images to each registry simultaneously.
DBuild images locally on a slow machine and push over a slow network.
Attempts:
2 left
💡 Hint

Think about build caching and automation features in ACR.

Best Practice
expert
2:00remaining
What is the recommended way to manage image tags in ACR for continuous deployment?

You want to implement a tagging strategy in Azure Container Registry that supports continuous deployment and easy rollback. Which approach is best?

AOverwrite the 'latest' tag with every build and delete all previous tags.
BUse only commit SHA hashes as tags without any human-readable tags.
CUse semantic version tags (e.g., v1.0.0) for releases and a 'latest' tag for the current stable image.
DTag images with the build timestamp only and never use semantic versions.
Attempts:
2 left
💡 Hint

Consider clarity, rollback, and deployment automation.