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
Using a self-hosted agent violates the requirement that the pipeline must run on Microsoft-hosted agents. This approach is not acceptable even though it would minimize duration.
- ✗
Add a script step to install the library using a package manager
Why it's wrong here
Adding a script to install the library each time increases pipeline duration because the installation step must be executed on every run. It would satisfy the requirement but does not minimize duration.
- ✗
Download the library from Azure Blob Storage in each build
Why it's wrong here
Downloading the library from Azure Blob Storage each build also adds overhead per run, increasing duration compared to having it pre-installed in a container image.
Go deeper
Related to this question
Learn chapter
Designing a Build Pipeline
Key term
Library
In Azure DevOps, a Library is a central repository for managing reusable content like variable groups and secure files that can be shared across multiple pipelines.
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
About these practice questions
One of 823 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 →
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.