Skip to main content

AI-200 practice question · Develop Containerized Solutions on Azure

A developer has built an image named aiservice:v1 on their workstation. They want to catch startup or runtime errors…

A developer has built an image named aiservice:v1 on their workstation. They want to catch startup or runtime errors privately before the image reaches the team's Azure container registry, contoso.azurecr.io, and is deployed to a shared environment. Which sequence should they follow?

  • ARun docker run -p 8080:80 aiservice:v1 and test locally; then az acr login, docker tag to contoso.azurecr.io/aiservice:v1, and docker push that tag
  • BRun docker run -p 8080:80 aiservice:v1 and test locally; then az acr login and docker push aiservice:v1 directly to send it to the registry
  • CRun az acr import --name contoso --source aiservice:v1 to copy the local image into the registry, then test it from there
  • DTag the image as contoso.azurecr.io/aiservice:v1 and push it, then test it after it's deployed to the shared dev Container Apps environment
Show the answer and explanation

Correct answer: A) Run docker run -p 8080:80 aiservice:v1 and test locally; then az acr login, docker tag to contoso.azurecr.io/aiservice:v1, and docker push that tag

Test the container locally with docker run before it reaches a shared registry. Then sign in with az acr login, tag the image with the registry's fully qualified login server name, and push that tag.

Why each option is right or wrong

  • A) Correct. Running the container locally with docker run shows build or runtime problems on the developer's own machine first. To push to ACR, the developer signs in with az acr login, tags the image with the fully qualified registry name (contoso.azurecr.io/...), and pushes that tag with docker push.
  • B) Incorrect. Testing locally first is right, but the image must be tagged with the fully qualified login server name before pushing. Without the contoso.azurecr.io prefix, docker push doesn't target the Azure registry.
  • C) Incorrect. az acr import copies images from other registries (public, Azure, or non-Azure private registries), not from a local Docker image store. It also skips the private local test the developer wants.
  • D) Incorrect. The tag and push steps are valid, but testing only after deploying to a shared environment means basic errors reach the registry and teammates first. That defeats the goal of catching problems privately.
Exam domain
Develop Containerized Solutions on Azure · 22% of AI-200
Question type
Multiple choice (one answer)

Practise the full AI-200 exam

This question is one of a small free sample from the CertRidge AI-200 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Microsoft; never copied from the real exam.