From 1ed9a47409a30ab60a6b886c20fc5ae818240ba0 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 29 Aug 2022 09:29:42 -0600 Subject: Man pages: refactor common options: --restart Only applicable to podman-create and -run. I went with the -run version because it is cleaner and more recently updated. Signed-off-by: Ed Santiago --- docs/source/markdown/options/restart.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/source/markdown/options/restart.md (limited to 'docs/source/markdown/options') diff --git a/docs/source/markdown/options/restart.md b/docs/source/markdown/options/restart.md new file mode 100644 index 000000000..825ae613f --- /dev/null +++ b/docs/source/markdown/options/restart.md @@ -0,0 +1,15 @@ +#### **--restart**=*policy* + +Restart policy to follow when containers exit. +Restart policy will not take effect if a container is stopped via the **podman kill** or **podman stop** commands. + +Valid _policy_ values are: + +- `no` : Do not restart containers on exit +- `on-failure[:max_retries]` : Restart containers when they exit with a non-zero exit code, retrying indefinitely or until the optional *max_retries* count is hit +- `always` : Restart containers when they exit, regardless of status, retrying indefinitely +- `unless-stopped` : Identical to **always** + +Please note that restart will not restart containers after a system reboot. +If this functionality is required in your environment, you can invoke Podman from a **systemd.unit**(5) file, or create an init script for whichever init system is in use. +To generate systemd unit files, please see **podman generate systemd**. -- cgit v1.2.3-54-g00ecf