Microsoft Azure Developer Associate AZ-204 Practice Question
You have an Azure Container Registry named contosoreg in the East US region. A working directory on your development machine contains application source code and a Dockerfile. You must build a Linux container image named webapp:v1 and publish it directly to contosoreg without installing Docker locally or uploading a pre-built image. Which Azure CLI command accomplishes this task?
docker push contosoreg.azurecr.io/webapp:v1
az acr build --registry contosoreg --image webapp:v1 --file Dockerfile .
az acr task create --registry contosoreg --context . --file Dockerfile --image webapp:v1 --schedule now
az acr import --name contosoreg --source . --image webapp:v1
The az acr build command uploads your source context to Azure Container Registry, builds the image in the cloud, tags it, and stores it in the specified registry in one step. az acr import copies an existing image from another registry; it cannot build from source. az acr task create only defines a build task and would still require a separate run operation. docker push would require that the image be built locally and that Docker be installed on the developer machine, which the scenario explicitly avoids.
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
What is the function of the az acr build command?
Open an interactive chat with Bash
How does az acr import differ from az acr build?
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 .