mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
{create,run} --replace
Add a `--replace` flag to the `container {create,run}` commands. If another container with the same name already exists, it will be replaced and removed. Adding this flag is motivated by #5485 to make running Podman in systemd units (or any other scripts/automation) more robust. In case of a crash, a container may not be removed by a sytemd unit anymore. The `--replace` flag allows for supporting crashes. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -662,6 +662,10 @@ its root filesystem mounted as read only prohibiting any writes.
|
||||
|
||||
If container is running in --read-only mode, then mount a read-write tmpfs on /run, /tmp, and /var/tmp. The default is *true*
|
||||
|
||||
**--replace**=**true**|**false**
|
||||
|
||||
If another container with the same name already exists, replace and remove it. The default is **false**.
|
||||
|
||||
**--restart**=*policy*
|
||||
|
||||
Restart policy to follow when containers exit.
|
||||
|
Reference in New Issue
Block a user