Browse code

Use -f for rm instead of kill before

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/04/25 03:05:17
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 {