浏览代码

Remove stopped containers on `down`

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 年之前
父节点
当前提交
26fe75a7e3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      local/compose.go

+ 2 - 0
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