Which agent pool builds an IIS Docker app in Azure Pipelines
Short answer
B Replace the Default pool with the Hosted Windows Container build agent pool to compile the IIS Docker web application.
Question
To compile an Internet Information Services (IIS) web application that runs docker, you should use a Default build agent pool.
Select
No adjustment required if the underlined segment is accurate. If the underlined segment is inaccurate, select the accurate option.Key Takeaways
This question tests agent pool selection by container OS: IIS implies a Windows container, and only the Hosted Windows Container pool can build it.
Building an IIS application packaged in Docker requires a Windows container-capable agent, so the Default pool statement is wrong and the Hosted Windows Container pool (B) is the correct replacement.
Common mistake: Option C (Hosted) is tempting because hosted agents ship with Docker, but standard hosted agents build Linux containers and cannot compile an IIS Windows container image.
Expert Analysis
The governing principle In Azure Pipelines, the agent pool must match the container OS you are building. Microsoft-hosted pools are offered per platform: a hosted Windows pool, hosted Ubuntu/Linux pools, hosted macOS, and — for this scenario — a pool whose agents are preconfigured with the Windows Containers feature so they can build and run Windows container images. IIS only runs on Windows, so an IIS application packaged in Docker is a Windows container image, not a Linux one.
Applying it to the question The underlined segment says a Default build agent pool should be used. The Default pool is the self-hosted pool created with your organization; its agents have only the tools you installed, and nothing guarantees the Windows Containers feature or a Docker engine configured for Windows containers. Option C (plain Hosted) gives a Windows agent with Docker for Linux containers only, which cannot build an IIS Windows image. Option D is wrong twice over: macOS agents cannot run containers at all. So the segment is inaccurate, and option B, Hosted Windows Container, is the correct replacement.
Trap to avoid Several comments argue for C on the grounds that hosted agents "already have Docker installed." That confuses Docker Engine with support for Windows containers: a standard hosted Windows agent builds Linux containers; building an IIS image needs the Hosted Windows Container pool (or an equivalently configured self-hosted agent). Others argue A because the sentence reads plausibly — but plausibility is not accuracy when the pool type is the deciding factor.
Why B is right It is the only option naming a pool purpose-built for Windows container workloads, which is exactly what compiling an IIS Docker application requires.
Official Reference
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops
This link opens the official vendor documentation in a new tab.
Exam Strategy
On agent-pool questions, first pin down the container or OS in the workload: IIS means Windows, so eliminate any pool that cannot run Windows containers (macOS, Linux-only hosted). Then decide between hosted and self-hosted: the Default pool only has what you installed, so a preconfigured Windows container pool wins. Read the whole sentence after substitution to confirm it still parses correctly.
Frequently Asked Questions
Why can't a standard hosted Windows agent build an IIS Docker image?
Is the Default pool ever acceptable for this build?
Why is Hosted macOS not an option?
Community Votes
60% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 41 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 30 of 41
-
esend3 👍 29 Answered BShould be the answer
-
AzureJobsTillRetire 👍 13 Answered CThe question asks if you "should use a Default build agent pool", with the word "Default" highlighted. The word "Default" can be replaced with "Hosted", which gives us the answer C. If the question asks for if you "should use a Default Build Agent Pool", the answer should be B (Hosted Windows Container)
-
Rams_84zO6n 👍 7esend3, do you actually see the underlined text on the questions? For me it doesn't render correctly. I use chrome browser on a macbook pro. Any advise?
-
col2511kol 👍 6 Answered BThe correct answer is B. Hosted Windows Container. When you need to compile an Internet Information Services (IIS) web application that runs on Docker, you should use a Hosted Windows Container build agent pool. This is because IIS is a web server created by Microsoft specifically for Windows-based systems. Since you want to run the application in a Docker container, a Hosted Windows Container build agent pool will provide the necessary Windows environment along with Docker support. A build agent pool is a collection of agents used for running build and deployment tasks in a continuous integration and delivery pipeline. The Hosted Windows Container build agent pool is a pre-configured, managed pool provided by Azure DevOps or other CI/CD platforms, which supports running Docker containers on a Windows-based system. By using this pool, you can ensure that your IIS web application is built and run in the appropriate environment.
-
omsingh 👍 5B. Hosted Windows Container is the accurate option. The underlined segment states that to compile an IIS web application that runs docker, you should use a Default build agent pool. However, this statement is incomplete and does not provide enough information. To compile an IIS web application that runs Docker, you need to use a hosted agent that supports Docker. The hosted agent should have Docker installed and running. The Default agent pool does not support Docker by default. Option B, Hosted Windows Container, is accurate because it provides a hosted agent that supports Docker for Windows. This agent can compile an IIS web application that runs Docker. Options C and D are not relevant because they do not provide agents that support Docker.
Show 25 more comments
-
jay158 👍 5 Answered CIMHO, there is nothing like 'Hosted Windows Container' https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#use-a-microsoft-hosted-agent
-
318touring 👍 4 Answered Bhttps://learn.microsoft.com/en-us/azure/devops/pipelines/process/service-containers?view=azure-devops&tabs=yaml#requirements as posted by Darkeh below
-
Firdous586 👍 3Azure Pipelines can run Linux or Windows Containers. Use either hosted Ubuntu for Linux containers, or the Hosted Windows Container pool for Windows containers. (The Hosted macOS pool doesn't support running containers.) When you need to compile an Internet Information Services (IIS) web application that runs on Docker, you should use a Hosted Windows Container build agent pool. This is because IIS is a web server created by Microsoft specifically for Windows-based systems. Since you want to run the application in a Docker container, a Hosted Windows Container build agent pool will provide the necessary Windows environment along with Docker support. Reference: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/service-containers?view=azure-devops&tabs=yaml#requirements
-
pdk88 👍 3It's really one of those "How do I read a Msoft question?" again. I focussed on the last sentense "you should use a Default build agent pool". If you replace this with the other answers, you'll get: B) you should use a Hosted Windows Container agent pool C) you should use a hosted agent pool There is no such thing as a 'Windows Container agent pool', so that's why I would go for C. I have to admit it's not the strongest argumentation, but that's the question neither :D. You do have Microsoft containers, but they all end up running on a self hosted agent or a hosted agent. example pool: vmImage: 'windows-2019' container: mcr.microsoft.com/windows/servercore:ltsc2019 https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops
-
pdk88 👍 3 Answered CI think the given answer is right. A self hosted agent (which is usually installed in the Default Pool) has most of the capabilities YOU have installed on the build server. Docker isn't an installed capability by default. A MS hosted agent on the other hand has the most capabilities already installed, of which Docker is one. So a hosted agent would suffice, hence C must be the right answer. https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops#download-and-configure-the-agent https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser#configure-agent-capabilities https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software
-
tecinfo 👍 3Explanation: To compile an Internet Information Services (IIS) web application that runs in Docker, you would need to use a build agent that supports Windows containers. The "Hosted Windows Container" agent pool is specifically designed for building and running Windows containers, which is essential for IIS applications, as IIS only runs on Windows. "No adjustment required" (A) is incorrect because the "Default build agent pool" might not necessarily support Windows containers. "Hosted" (C) is a general agent pool but doesn't guarantee Windows container support. "Hosted macOS" (D) is irrelevant, as macOS doesn't support IIS or Windows containers. Thus, the accurate option is B. Hosted Windows Container.
-
Cervezerg 👍 3 Answered BThe accurate option is B. Hosted Windows Container. To compile an Internet Information Services (IIS) web application that runs Docker, it is recommended to use the "Hosted Windows Container" agent pool in Azure DevOps. This agent pool provides the necessary environment for building and running Windows-based Docker containers. The "Default build" agent pool is a generic pool that may not have the specific dependencies and configurations required for building and running Docker containers. Therefore, it is not the appropriate choice for compiling an IIS web application that runs Docker.
-
friendlyvlad 👍 3Microsoft-hosted agents can run jobs directly on the VM or in a container. Azure Pipelines provides a predefined agent pool named Azure Pipelines with Microsoft-hosted agents. For many teams, this is the simplest way to run your jobs. You can try it first and see if it works for your build or deployment. The answer is C.
-
lyona 👍 3You just need a hosted windows agent (C). Building inside a container (B) is specific to using Container Jobs, which is running the agent with a hosted container, which is useful if you have specific pre-reqs since you can manage the image yourself, but it's not for building another container.
-
Mousavi 👍 3 Answered BIIS web applications running in Docker containers require a Windows-based environment, specifically a build agent pool that supports Windows containers. Therefore, "Hosted Windows Container Most Voted" would be the most suitable agent pool for building IIS applications within Docker.
-
fishy_resolver 👍 3 Answered CBased on Microsoft's documentation you don't need a container to build a container, you do need a Microsoft-hosted Windows agents or Windows platform based self-hosted agents. https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/build-image?view=azure-devops
-
Zeus666 👍 2 Answered BThe underlined segment is inaccurate. To compile an Internet Information Services (IIS) web application that runs Docker, you should use a build agent pool that supports Windows containers. The correct option is: B. Hosted Windows Container This option provides the necessary environment for building and running Windows-based containers, which is essential for your IIS web application that runs Docker. So the correct choice is B. Hosted Windows Container.
-
yana_b 👍 2 Answered CCorrect answer is C The agent pool could be either MS hosted or self-hosted. In regard with self hosted -> You can install the agent on Linux, macOS, or Windows machines. You can also install an agent on a Docker container. For more information about installing a self-hosted agent, see: - macOS agent - Linux agent - Windows agent - Docker agent https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser
-
karrey 👍 2 Answered BB. Hosted Windows Container The underlined segment is inaccurate. To compile an Internet Information Services (IIS) web application that runs Docker, you should use the Hosted Windows Container build agent pool, as it provides a build environment with Docker and Windows containers support, which is necessary for building and running IIS web applications using Docker.
-
jvyas 👍 2pool: vmImage: 'windows-2019' container: mcr.microsoft.com/windows/servercore:ltsc2019 "Since this example uses the Windows 2019 image, we will use the 2019 tag for the container." B Hosted windows container is more specific to run containers, than just hosted.
-
poesklap 👍 2 Answered BOption C. Hosted is not suitable for IIS applications running in Docker because the Hosted agent pool doesn’t support Windows containers. It runs on Linux-based agents, which don’t have the necessary Windows OS dependencies required for IIS.
-
FeriAZ 👍 2 Answered BB. Hosted Windows Container: This type of agent pool specifically provides Windows agents with Docker pre-installed and configured, making them suitable for building Dockerized applications, including IIS web apps.
-
giuliohome 👍 2Yes there is: it is the vmImage you have to specify under the hosted pool, because it must be windows (not the yaml default: ubuntu) in this case.
-
kleansoul 👍 2 Answered BThe answer should be Hosted Windows Container. https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops
-
Eltooth 👍 2 Answered CC is correct answer.
-
ozbonny 👍 1I think I'll go with Hosted Windows Container because of the following: Reasoning: The Azure DevOps Hosted build agent pool contains a variety of agents with different operating systems, including Windows. Some of the Windows agents in the pool support Docker. IIS is a Windows web server. Therefore, it is logical to deduce that the "Hosted build agent pool" contains agents that can run IIS web applications with Docker. However, it is important to note that not all Windows agents in the pool support Docker. To ensure compatibility, it is recommended: Select a Windows agent that is labeled "Docker" in the agent list.
-
elmarkos23 👍 1B. Hosted Windows Container The underlined segment is inaccurate. To compile an Internet Information Services (IIS) web application that runs Docker, you should use the "Hosted Windows Container" build agent pool. This pool provides an environment with the necessary tools and capabilities to build and run Docker containers on Windows. Using the "Default" build agent pool may not have the required dependencies and configurations for building and running Docker containers. Therefore, the accurate option is B. Hosted Windows Container.
-
Jis247 👍 1 Answered Chttps://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops Before you begin: If your code is in Azure Pipelines and a Microsoft-hosted agent meets your needs, you can skip setting up a self-hosted Windows agent. If your code is in an on-premises Team Foundation Server (TFS) 2015 server, see Deploy an agent on Windows for on-premises TFS 2015. Otherwise, you've come to the right place to set up an agent on Windows. Continue to the next section.
-
Shadoken 👍 1The underlined segment is inaccurate. To compile an Internet Information Services (IIS) web application that runs on Docker, the appropriate build agent pool to use would be a Hosted Windows Container pool. This pool provides a Windows environment with Docker support to ensure that the application is built and run in the appropriate environment. So the correct option is: B. Hosted Windows Container (Answered by Copilot)
-
4bd3116 👍 1 Answered BIIS (Internet Information Services) is a web server software designed by Microsoft and is primarily built for the Windows operating system. It is not natively supported on macOS. Therefore, if you need to compile an IIS web application, you would typically require a Windows-based environment.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AZ-400 Questions
Access 100 questions with complete answers and detailed explanations.
View Full AZ-400 Practice Test →