Skip to content

Commit 26fe75a

Browse files
committed
Remove stopped containers on down
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent e37dd90 commit 26fe75a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

local/compose.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ func (s *composeService) Down(ctx context.Context, projectName string) error {
502502
func (s *composeService) removeContainers(ctx context.Context, w progress.Writer, eg *errgroup.Group, filter filters.Args) error {
503503
containers, err := s.apiClient.ContainerList(ctx, moby.ContainerListOptions{
504504
Filters: filter,
505+
All: true,
505506
})
506507
if err != nil {
507508
return err
@@ -533,6 +534,7 @@ func (s *composeService) projectFromContainerLabels(ctx context.Context, project
533534
Filters: filters.NewArgs(
534535
projectFilter(projectName),
535536
),
537+
All: true,
536538
})
537539
if err != nil {
538540
return nil, err

0 commit comments

Comments
 (0)