Question 366 of 881
AZ-204 Develop Azure compute solutions Practice Question
You deploy a containerized application to Azure Container Instances (ACI). The application writes logs that must persist across container restarts and be accessible from a file system. The solution must minimize cost and complexity. Which configuration should you use?
⚠ Common exam trap
Candidates often confuse ephemeral Docker volumes (which are lost on restart) with persistent Azure Files shares, or mistakenly think Azure Container Registry can store runtime data like logs.
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
✓
Mount an Azure Files share as a volume
Mounting an Azure Files share as a volume in Azure Container Instances provides persistent, shared file storage that survives container restarts and is accessible via the container's file system. This approach minimizes cost by using standard Azure Files storage (pay only for consumed capacity) and complexity by leveraging ACI's native volume mount support without requiring additional orchestration or stateful infrastructure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Mount an Azure Files share as a volume
Why this is correct
Mounting an Azure Files share as a volume is the correct approach for persistent storage in Azure Container Instances (ACI). Azure Files provides fully managed SMB file shares that can be easily mounted into an ACI container group, allowing the containerized application to write logs or other persistent data to a network-attached file system. This ensures that data persists beyond the lifecycle of the individual container instance, even if the container restarts or is redeployed, offering a robust and cost-effective solution for stateful applications.
- ✗
Store logs in Azure Container Registry
Why it's wrong here
Storing logs in Azure Container Registry (ACR) is incorrect because ACR is designed exclusively for storing and managing container images, OCI artifacts, and Helm charts. It functions as a private registry for your containerized application's build artifacts, not as a runtime data store or a logging solution for operational data generated by running containers. ACR lacks the necessary features for log ingestion, querying, or long-term archival, making it entirely unsuitable for log management.
- ✗
Use a Docker volume in the container
Why it's wrong here
Using a Docker volume directly in Azure Container Instances is not a supported or practical method for persistent storage. Docker volumes are typically managed by the local Docker daemon on a host machine and are designed for local persistence within that specific Docker environment. ACI is a serverless platform that abstracts away the underlying host and Docker daemon, meaning it does not expose or directly support the management of local Docker volumes for cross-container or persistent storage needs. Instead, ACI relies on integrated Azure storage services like Azure Files for managed persistence.
- ✗
Pass log path via an environment variable
Why it's wrong here
Passing a log path via an environment variable is insufficient for achieving persistent log storage. Environment variables are used for configuring a container's runtime behavior, such as specifying where an application *should* write its logs within the container's file system. However, they do not provide any mechanism for *persisting* the actual log data beyond the container's lifecycle. Once the container stops or restarts, any data written to a non-persistent path within the container's ephemeral file system is lost, rendering environment variables unsuitable for data persistence.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This AZ-204 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-204 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.