You need to perform inline testing in an Azure DevOps pipeline that uses a Docker deployment model, and you must ensure the test results are not published to the pipeline. Which of the following should you use for inline testing?
Choose an answer
Tap an option to check your answer.
Correct answer: a multi-stage Dockerfile.
Why this is the answer
A multi-stage Dockerfile allows you to build an image that includes your application code and testing tools in an initial stage, run tests, and then copy only the application artifacts to a final, smaller image. This approach enables inline testing within the Docker build process. The test results are generated during an intermediate stage and are not inherently published to the pipeline, fulfilling the requirement. A single-stage Dockerfile would include testing tools in the final image, making it unnecessarily large and not isolating the test execution. An Azure Kubernetes Service (AKS) pod is a deployment target, not a mechanism for inline testing within a Docker build. A Docker Compose file is used for defining and running multi-container Docker applications, not for performing inline testing within a single image build process.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed