Table of Contents

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 = 1

Always restart, regardless of exit code. The container is also restarted when the Docker daemon restarts.

No = 0

Never restart automatically (default).

OnFailure = 3

Restart only when the container exits with a non-zero status code. Use MaxRestartRetries to cap retry attempts.

UnlessStopped = 2

Restart always, except when the container was explicitly stopped by the user. Unlike Always, does not restart after a manual docker stop.