diff options
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index cf669eeb4..32902d9c6 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -103,6 +103,11 @@ func (r *Runtime) RemoveContainer(c *Container, force bool) error { if err := r.ociRuntime.stopContainer(c, ctrRemoveTimeout); err != nil { return errors.Wrapf(err, "cannot remove container %s as it could not be stopped", c.ID()) } + + // Need to update container state to make sure we know it's stopped + if err := c.syncContainer(); err != nil { + return err + } } else if !(c.state.State == ContainerStateConfigured || c.state.State == ContainerStateCreated || c.state.State == ContainerStateStopped) { |