Fix bug with exited state and container remove
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
parent
29dbab6440
commit
39d7c869ea
|
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue