# RestartPolicy


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





Schema constraints and annotations:

```json
{
  "description": "The behavior to apply when the container exits. The default is not to\nrestart.\n\nAn ever increasing delay (double the previous delay, starting at 100ms) is\nadded before each restart to prevent flooding the server.\n",
  "properties": {
    "MaximumRetryCount": {
      "description": "If `on-failure` is used, the number of times to retry before giving up.\n",
      "type": "integer"
    },
    "Name": {
      "description": "- Empty string means not to restart\n- `no` Do not automatically restart\n- `always` Always restart\n- `unless-stopped` Restart always except when the user has manually stopped the container\n- `on-failure` Restart only when the container exit code is non-zero\n",
      "enum": [
        "",
        "no",
        "always",
        "unless-stopped",
        "on-failure"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```



