Share via


RestartPolicy Class

Definition

Defines the restart policy for a Docker service in a Swarm cluster.

[YamlDotNet.Serialization.YamlSerializable]
public sealed class RestartPolicy
[<YamlDotNet.Serialization.YamlSerializable>]
type RestartPolicy = class
Public NotInheritable Class RestartPolicy
Inheritance
RestartPolicy
Attributes
YamlDotNet.Serialization.YamlSerializableAttribute

Remarks

This class specifies the conditions, delay, maximum attempts, and time window involved in restarting a Docker service container within a Swarm deployment.

Constructors

RestartPolicy()

Properties

Condition

Specifies the condition under which a service's container will be restarted.

Delay

Specifies the delay duration between restart attempts of the service container.

MaxAttempts

Specifies the maximum number of restart attempts allowed for a container as part of the restart policy.

Window

Defines the time window for evaluating the restart conditions in a Docker service restart policy.

Applies to