Microsoft Azure Developer Associate AZ-204 Practice Question
You have an Azure Container Registry (ACR) named contosoacr and a local directory containing a Dockerfile and application source. From your development workstation that has only the Azure CLI installed, you must build an image tagged with the CI build ID contained in the environment variable $(Build.BuildId) and push it to the registry in one step. Which CLI command should you run?
The Az CLI "acr build" command builds the image in Azure and automatically pushes it to the specified registry when the build completes. Supplying the local context path ".", the Dockerfile, the registry name, and the image tag meets the requirement in a single step without needing Docker locally. "acr task create" only defines a task and would still require a separate run command. "acr import" pulls an existing image into the registry rather than building one. Using the local "docker build" followed by "docker push" needs Docker Engine installed on the workstation, violating the constraint that only the Azure CLI is available.
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 Azure Container Registry (ACR)?
Open an interactive chat with Bash
How does `az acr build` simplify image creation and pushing?
Open an interactive chat with Bash
Can you explain the difference between `az acr build` and `az acr task create`?
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 .