Merge pull request from vrothberg/fix-7384

podman stop: do not cleanup for auto-removal
This commit is contained in:
OpenShift Merge Robot
2020-09-08 10:18:01 -04:00
committed by GitHub

@ -174,6 +174,12 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
return err
}
}
if c.AutoRemove() {
// Issue #7384: if the container is configured for
// auto-removal, it might already have been removed at
// this point.
return nil
}
return c.Cleanup(ctx)
})
if err != nil {