You plan to deploy a containerized batch job to Azure Container Instances (ACI) to process imported data. You need to ensure that the container does not restart after a successful execution. Which of the following restart policies can you configure to prevent restarts after a successful execution? (Select two.)
- NeverAnswer
- OnFailureAnswer
- CAlways
- DOnError
Answer
To prevent a container from restarting after a successful execution in Azure Container Instances, you can configure either the Never or OnFailure restart policies.
For containerized tasks that run once and should not restart upon successful completion, both the Never policy (which prohibits restarts under any condition) and the OnFailure policy (which only restarts the container if the process exits with an error code) are valid configuration choices.
Step-by-Step Solution
Key Concept
Azure Container Instances supports three restart policies: Always, Never, and OnFailure. For workloads that run to completion and should not run again after a successful execution, both Never and OnFailure are valid choices.