diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-06-10 16:26:24 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-06-15 15:53:51 +0200 |
commit | fa3b8a75c4ec571f8cbb2622ea624b42bc5c2472 (patch) | |
tree | 23b4ebcca03d20cedadfa094d51469d55e756b83 /docs | |
parent | f4c3b718eb22a161a897a6ed55d10f3a07e31aa8 (diff) | |
download | podman-fa3b8a75c4ec571f8cbb2622ea624b42bc5c2472.tar.gz podman-fa3b8a75c4ec571f8cbb2622ea624b42bc5c2472.tar.bz2 podman-fa3b8a75c4ec571f8cbb2622ea624b42bc5c2472.zip |
{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>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/markdown/podman-create.1.md | 4 | ||||
-rw-r--r-- | docs/source/markdown/podman-run.1.md | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index dbc835920..1da9d72e6 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -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. diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 22f7cae09..3e1ade047 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -671,6 +671,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. |