mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-19 06:07:50 +00:00
Merge pull request #7155 from mheon/fix_rmi_force
Ensure that 'rmi --force' evicts Podman containers
This commit is contained in:
commit
ca2bda6420
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ func (r *Runtime) RemoveImage(ctx context.Context, img *image.Image, force bool)
|
|||
imageCtrs = append(imageCtrs, ctr)
|
||||
}
|
||||
}
|
||||
if len(imageCtrs) > 0 && len(img.Names()) <= 1 {
|
||||
if len(imageCtrs) > 0 && (len(img.Names()) <= 1 || (force && img.InputIsID())) {
|
||||
if force {
|
||||
for _, ctr := range imageCtrs {
|
||||
if err := r.removeContainer(ctx, ctr, true, false, false); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue