Microsoft Azure Developer Associate AZ-204 Practice Question
Your build script runs in Azure Cloud Shell and must build a Docker image from the current directory and publish it to an existing Azure Container Registry named contosoacr. The solution must not require the Cloud Shell environment to have the Docker engine installed. Which Azure CLI command should you run?
az acr import --name contosoacr --source . --image web:v1
The az acr build command submits the build context to the Azure Container Registry task service, which performs the Docker build and pushes the resulting image back to the registry. Because the build happens in Azure, Docker does not need to be installed in the local environment. The command must reference the target registry and provide the desired image name and tag. az acr import copies an existing image from another registry, not a local build context. Combining docker build and docker push requires the Docker engine to be available, which contradicts the requirements. az container create deploys a running container instance and does not build or publish an image.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the Azure Container Registry (ACR)?
Open an interactive chat with Bash
How does az acr build differ from docker build?
Open an interactive chat with Bash
What is a Docker build context and why is it important?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Develop Azure compute solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .