class documentation
Used when creating a :py:class:`~docker.types.ContainerSpec`, dictates whether a container should restart after stopping or failing. Args: condition (string): Condition for restart (``none``, ``on-failure``, or ``any``). Default: `none`. delay (int): Delay between restart attempts. Default: 0 max_attempts (int): Maximum attempts to restart a given container before giving up. Default value is 0, which is ignored. window (int): Time window used to evaluate the restart policy. Default value is 0, which is unbounded.
Method | __init__ |
Undocumented |
def __init__(self, condition=RestartConditionTypesEnum.NONE, delay=0, max_attempts=0, window=0):
(source)
¶
Undocumented