mirror of https://github.com/docker/compose.git
Merge pull request #1017 from docker/down_remove_stopped
Remove stopped containers on `down`
This commit is contained in:
commit
32efa581f8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue