mirror of
https://github.com/containers/podman.git
synced 2025-05-28 13:40:33 +08:00

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 <santiago@redhat.com>
934 B
934 B
--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 exiton-failure[:max_retries]
: Restart containers when they exit with a non-zero exit code, retrying indefinitely or until the optional max_retries count is hitalways
: Restart containers when they exit, regardless of status, retrying indefinitelyunless-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.