소스 검색

When running compose down, remove containers with Force=true in case some container is still up for any reason (happened in some E2E test once)

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 년 전
부모
커밋
0a5328748a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      local/compose/down.go

+ 1 - 1
local/compose/down.go

@@ -101,7 +101,7 @@ func (s *composeService) removeContainers(ctx context.Context, w progress.Writer
 				return err
 			}
 			w.Event(progress.RemovingEvent(eventName))
-			err = s.apiClient.ContainerRemove(ctx, toDelete.ID, moby.ContainerRemoveOptions{})
+			err = s.apiClient.ContainerRemove(ctx, toDelete.ID, moby.ContainerRemoveOptions{Force: true})
 			if err != nil {
 				w.Event(progress.ErrorMessageEvent(eventName, "Error while Removing"))
 				return err