Courseiva

AZ-400 Container jobs Practice Question

You are designing a build pipeline that must run on Microsoft-hosted agents. The pipeline has a dependency on a native library that is not pre-installed. You want to minimize pipeline duration. Which approach should you use?

⚠ Common exam trap

Candidates may think self-hosted agents are required for pre-installed dependencies, but container jobs on Microsoft-hosted agents achieve the same benefit with less management overhead and still meet the requirement.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use a container job with a custom Docker image that includes the library

Using a container job with a custom Docker image that includes the native library allows the pipeline to run on Microsoft-hosted agents while eliminating installation overhead, thus minimizing pipeline duration. This approach meets the requirement of using Microsoft-hosted agents and avoids the time cost of installing the library in each run.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use a container job with a custom Docker image that includes the library

    Why this is correct

    Using a container job with a custom Docker image that includes the library allows the pipeline to run on Microsoft-hosted agents while avoiding the time needed to install the library in each run. This minimizes pipeline duration and meets the requirement.

  • ✗

    Use a self-hosted agent with the library pre-installed

    Why it's wrong here

    Self-hosted agents contradict the stated requirement that the pipeline run on Microsoft-hosted agents, so the dependency cannot be pre-installed there. It tempts because self-hosted agents with baked-in libraries genuinely cut setup time when the constraint is duration alone and hosted agents are not mandated.

  • ✗

    Add a script step to install the library using a package manager

    Why it's wrong here

    Installing the library at runtime adds download and installation time to every build, increasing pipeline duration. Baking the dependency into a custom container image or self-hosted agent avoids repeated installation; a package-manager script is the fallback when pre-installation is impossible.

  • ✗

    Download the library from Azure Blob Storage in each build

    Why it's wrong here

    Downloading from Blob Storage each run adds network transfer to every build, lengthening duration; caching the library across runs avoids repeated retrieval. Blob download suits one-off artefacts or large files not needed every build, not a recurring native dependency on Microsoft-hosted agents.

About these practice questions

One of 696 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.