Based on the exhibit, which restart policy should be configured for the container group?
Never is the correct restart policy for a one-time task that should stop after finishing successfully. The exhibit describes a batch-style import job, not a long-running service. Using Never ensures the container exits and stays stopped until the next deployment or scheduled run. That behavior matches operational expectations for a completed import process.
Why this answer
The container group in the exhibit is configured with a restart policy of 'Never' because it is designed to run a batch job that should execute once and then terminate. Azure Container Instances supports three restart policies: Always, OnFailure, and Never. Since the task is a one-time job, 'Never' ensures the container does not restart after completion, which is the correct choice for a single-run workload.
Exam trap
The trap here is that candidates confuse Docker's native restart policies (which include 'UnlessStopped') with Azure Container Instances' supported policies, leading them to select 'UnlessStopped' even though it is not available in ACI.
Why the other options are wrong
The exhibit shows a container group that runs a batch job; 'Always' would cause the container to restart indefinitely even after successful completion, which is not desired for a one-time task.
The container group is designed for a single-run task (e.g., a batch job) that must not restart after completion. OnFailure would restart the container if it exits with a non-zero code, but the task is expected to succeed and should not restart even on failure.
The question asks for a restart policy for a container group, and 'UnlessStopped' is not a valid restart policy for Azure Container Instances; the valid options are Always, Never, and OnFailure.
When would these options actually be correct?
For a container group running a long-lived service like a web server that must be automatically restarted after any crash or stop, 'Always' is correct.
A container group runs a batch processing job that should automatically restart only if it fails (non-zero exit code). For example, a data transformation task that must be retried upon failure until success.
In a Docker environment (not Azure Container Instances), 'UnlessStopped' is a valid restart policy. An exam question about Docker container restart policies where the container should restart unless explicitly stopped would have 'UnlessStopped' as the correct answer.
Why candidates pick the wrong answer
Candidates may think 'Always' is the default or safest restart policy, not realizing that for batch jobs or tasks that should run once, 'Never' or 'OnFailure' is appropriate.
Candidates often associate OnFailure with batch jobs that need retry on error, but overlook that the question's exhibit shows a task that must not restart under any condition, making Never the correct choice.
Candidates may confuse Docker restart policies with Azure Container Instances policies, or they might think 'UnlessStopped' is a more flexible version of 'Always' that stops restarting when the container is manually stopped.