From 26fe75a7e3f6cbfcec5165c241794ebb911da672 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Mon, 7 Dec 2020 11:39:21 +0100 Subject: [PATCH] Remove stopped containers on `down` Signed-off-by: Nicolas De Loof --- local/compose.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/local/compose.go b/local/compose.go index 3caabdd66..1d8b44305 100644 --- a/local/compose.go +++ b/local/compose.go @@ -502,6 +502,7 @@ func (s *composeService) Down(ctx context.Context, projectName string) error { func (s *composeService) removeContainers(ctx context.Context, w progress.Writer, eg *errgroup.Group, filter filters.Args) error { containers, err := s.apiClient.ContainerList(ctx, moby.ContainerListOptions{ Filters: filter, + All: true, }) if err != nil { return err @@ -533,6 +534,7 @@ func (s *composeService) projectFromContainerLabels(ctx context.Context, project Filters: filters.NewArgs( projectFilter(projectName), ), + All: true, }) if err != nil { return nil, err