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 /cmd/podman/common/create_opts.go | |
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 'cmd/podman/common/create_opts.go')
-rw-r--r-- | cmd/podman/common/create_opts.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go index 98dc6744c..49052704e 100644 --- a/cmd/podman/common/create_opts.go +++ b/cmd/podman/common/create_opts.go @@ -76,6 +76,7 @@ type ContainerCLIOpts struct { ReadOnly bool ReadOnlyTmpFS bool Restart string + Replace bool Rm bool RootFS bool SecurityOpt []string |