Add an API for removing a container and dependencies

This is the initial stage of implementation. The current API
functions but does not report the additional containers and pods
removed. This is necessary to properly display results to the
user after `podman rm --all`.

The existing remove-dependencies code has been removed in favor
of this more native solution.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2023-04-14 11:36:22 -04:00
parent a7e23d341d
commit e8d7456278
7 changed files with 90 additions and 105 deletions

View File

@ -142,7 +142,7 @@ func (r *Runtime) removeMalformedPod(ctx context.Context, p *Pod, ctrs []*Contai
ctrNamedVolumes[vol.Name] = vol
}
return r.removeContainer(ctx, ctr, force, false, true, true, timeout)
return r.removeContainer(ctx, ctr, force, false, true, true, false, false, timeout)
}()
if removalErr == nil {