RestartPolicy

@Serializable
data class RestartPolicy(val name: RestartPolicy.Name? = null, val maximumRetryCount: Int? = null)

The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.

Parameters

name
  • Empty string means not to restart - no Do not automatically restart - always Always restart - unless-stopped Restart always except when the user has manually stopped the container - on-failure Restart only when the container exit code is non-zero

maximumRetryCount

If on-failure is used, the number of times to retry before giving up.

Constructors

Link copied to clipboard
constructor(name: RestartPolicy.Name? = null, maximumRetryCount: Int? = null)

Types

Link copied to clipboard
@Serializable
enum Name : Enum<RestartPolicy.Name>

Values: EMPTY,NO,ALWAYS,UNLESS_STOPPED,ON_FAILURE

Properties

Link copied to clipboard
@SerialName(value = "MaximumRetryCount")
val maximumRetryCount: Int?
Link copied to clipboard
@SerialName(value = "Name")
val name: RestartPolicy.Name?