From b7d8f8602772b55031a74de21719c4a31c962cd0 Mon Sep 17 00:00:00 2001 From: avivpxi <42111576+avivpxi@users.noreply.github.com> Date: Sun, 24 Dec 2023 15:27:58 +0200 Subject: [PATCH] fix error handling on stop container (#12) --- docker/component.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/component.go b/docker/component.go index 57f0c1a..ab074a4 100644 --- a/docker/component.go +++ b/docker/component.go @@ -225,7 +225,7 @@ func (c *Component) Stop(ctx context.Context) error { } err = c.cli.ContainerRemove(ctx, cont.ID, types.ContainerRemoveOptions{Force: true}) - if err != nil && !errdefs.IsNotFound(err) { + if err != nil && !errdefs.IsNotFound(err) && !errdefs.IsConflict(err) { return err }