diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2022-01-12 15:33:00 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2022-01-13 17:08:31 +0100 |
commit | a4cef543504600db95453aa863b97ed82c833d41 (patch) | |
tree | a48d511c9a677f3a2b1f5f84769910baea53f6fe /cmd | |
parent | ab7228b3c27719e447de4dffe9b3fd7f67d6f346 (diff) | |
download | podman-a4cef543504600db95453aa863b97ed82c833d41.tar.gz podman-a4cef543504600db95453aa863b97ed82c833d41.tar.bz2 podman-a4cef543504600db95453aa863b97ed82c833d41.zip |
podman container rm: remove pod
Support removing the entire pod when --depend is used on an infra
container. --all now implies --depend to properly support removing all
containers and not error out when hitting infra containers.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/rm.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go index cede0ba14..a8fdee7fd 100644 --- a/cmd/podman/containers/rm.go +++ b/cmd/podman/containers/rm.go @@ -110,6 +110,11 @@ func rm(cmd *cobra.Command, args []string) error { args = append(args, id) } + if rmOptions.All { + logrus.Debug("--all is set: enforcing --depend=true") + rmOptions.Depend = true + } + return removeContainers(args, rmOptions, true) } |