1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #12755 from LK4D4/use_f_for_remove

Use -f for rm instead of kill before
This commit is contained in:
Brian Goff 2015-04-24 15:34:38 -04:00
commit b76bbae413

View file

@ -361,9 +361,7 @@ func readBody(b io.ReadCloser) ([]byte, error) {
func deleteContainer(container string) error {
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...))
// set error manually if not set
if exitCode != 0 && err == nil {