Browse code

Merge pull request #12755 from LK4D4/use_f_for_remove

Use -f for rm instead of kill before

Brian Goff authored on 2015/04/25 04:34:38
Showing 1 changed files
... ...
@@ -361,9 +361,7 @@ func readBody(b io.ReadCloser) ([]byte, error) {
361 361
 
362 362
 func deleteContainer(container string) error {
363 363
 	container = strings.TrimSpace(strings.Replace(container, "\n", " ", -1))
364
-	killArgs := strings.Split(fmt.Sprintf("kill %v", container), " ")
365
-	runCommand(exec.Command(dockerBinary, killArgs...))
366
-	rmArgs := strings.Split(fmt.Sprintf("rm -v %v", container), " ")
364
+	rmArgs := strings.Split(fmt.Sprintf("rm -fv %v", container), " ")
367 365
 	exitCode, err := runCommand(exec.Command(dockerBinary, rmArgs...))
368 366
 	// set error manually if not set
369 367
 	if exitCode != 0 && err == nil {