1. A development team is using Azure Container Instances (ACI) to run a containerized batch job. They notice that when the container group restarts, all files written inside the container's local filesystem are lost. They need the data to persist across container group restarts. What is the MOST appropriate solution?
- A. Increase the CPU and memory allocated to the container group
- B. Mount an Azure Files share as a volume in the container group✓ Correct
- C. Enable a restart policy of 'Always' on the container group
- D. Use a multi-container group and copy files between containers
Explanation
ACI container local filesystems are ephemeral and destroyed on restart. Mounting an Azure Files share as a volume provides persistent storage that survives container group restarts and can be shared across containers, which is the supported and recommended approach for ACI data persistence. — Increasing CPU and memory affects compute resources but has no effect on storage persistence. — Setting the restart policy to 'Always' ensures the container restarts on failure but does not change the fact that the local filesystem is wiped on each restart — data still won't persist. — Using a multi-container group to copy files between containers does not help because all containers in the group share the same ephemeral lifecycle; data is still lost when the group restarts.