mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Use -f for rm instead of kill before
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
790c63a5ef
commit
887ad57cfa
1 changed files with 1 additions and 3 deletions
|
@ -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), " ")
|
rmArgs := strings.Split(fmt.Sprintf("rm -fv %v", container), " ")
|
||||||
runCommand(exec.Command(dockerBinary, killArgs...))
|
|
||||||
rmArgs := strings.Split(fmt.Sprintf("rm -v %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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue