mirror of
https://github.com/containers/podman.git
synced 2025-12-06 05:37:49 +08:00
Fix bug with exited state and container remove
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@@ -262,7 +262,8 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool)
|
||||
}
|
||||
} else if !(c.state.State == ContainerStateConfigured ||
|
||||
c.state.State == ContainerStateCreated ||
|
||||
c.state.State == ContainerStateStopped) {
|
||||
c.state.State == ContainerStateStopped ||
|
||||
c.state.State == ContainerStateExited) {
|
||||
return errors.Wrapf(ErrCtrStateInvalid, "cannot remove container %s as it is %s - running or paused containers cannot be removed", c.ID(), c.state.State.String())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user