소스 검색

Merge pull request #12755 from LK4D4/use_f_for_remove

Use -f for rm instead of kill before
Brian Goff 10 년 전
부모
커밋
b76bbae413
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      integration-cli/docker_utils.go

+ 1 - 3
integration-cli/docker_utils.go

@@ -361,9 +361,7 @@ func readBody(b io.ReadCloser) ([]byte, error) {
 
 
 func deleteContainer(container string) error {
 func deleteContainer(container string) error {
 	container = strings.TrimSpace(strings.Replace(container, "\n", " ", -1))
 	container = strings.TrimSpace(strings.Replace(container, "\n", " ", -1))
-	killArgs := strings.Split(fmt.Sprintf("kill %v", container), " ")
-	runCommand(exec.Command(dockerBinary, killArgs...))
-	rmArgs := strings.Split(fmt.Sprintf("rm -v %v", container), " ")
+	rmArgs := strings.Split(fmt.Sprintf("rm -fv %v", container), " ")
 	exitCode, err := runCommand(exec.Command(dockerBinary, rmArgs...))
 	exitCode, err := runCommand(exec.Command(dockerBinary, rmArgs...))
 	// set error manually if not set
 	// set error manually if not set
 	if exitCode != 0 && err == nil {
 	if exitCode != 0 && err == nil {