From 39d7c869ea9291352e836f3c170d9bd801f9c35c Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 2 Oct 2018 12:07:23 -0400 Subject: Fix bug with exited state and container remove Signed-off-by: Matthew Heon --- libpod/runtime_ctr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 0fe896e5f..4256a84a0 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -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()) } -- cgit v1.2.3-54-g00ecf