From a4cef543504600db95453aa863b97ed82c833d41 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 12 Jan 2022 15:33:00 +0100 Subject: 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 --- cmd/podman/containers/rm.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd') 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) } -- cgit v1.2.3-54-g00ecf