Enum RestartPolicy
- Namespace
- Bielu.Microservices.Orchestrator.Models
- Assembly
- Bielu.Microservices.Orchestrator.dll
Controls when a container is automatically restarted by the runtime.
public enum RestartPolicy
Fields
Always = 1Always restart, regardless of exit code. The container is also restarted when the Docker daemon restarts.
No = 0Never restart automatically (default).
OnFailure = 3Restart only when the container exits with a non-zero status code. Use MaxRestartRetries to cap retry attempts.
UnlessStopped = 2Restart always, except when the container was explicitly stopped by the user. Unlike Always, does not restart after a manual
docker stop.