diff --git a/Dockerfile b/Dockerfile index f3495a59..ff14ef7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ RUN mkdir -p /usr/src/criu \ && rm -rf /usr/src/criu # Install runc -ENV RUNC_COMMIT v1.0.0-rc3 +ENV RUNC_COMMIT 639454475cb9c8b861cc599f8bcd5c8c790ae402 RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ diff --git a/oci/oci.go b/oci/oci.go index 2e4d1644..b04c60bd 100644 --- a/oci/oci.go +++ b/oci/oci.go @@ -510,7 +510,8 @@ func (r *Runtime) StopContainer(c *Container, timeout int64) error { func (r *Runtime) DeleteContainer(c *Container) error { c.opLock.Lock() defer c.opLock.Unlock() - return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.Path(c), "delete", c.name) + _, err := utils.ExecCmd(r.Path(c), "delete", "--force", c.name) + return err } // UpdateStatus refreshes the status of the container. diff --git a/utils/utils.go b/utils/utils.go index 340e1ba9..1635e4b4 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -23,7 +23,7 @@ func ExecCmd(name string, args ...string) (string, error) { err := cmd.Run() if err != nil { - return "", fmt.Errorf("`%v %v` failed: %v (%v)", name, strings.Join(args, " "), stderr.String(), err) + return "", fmt.Errorf("`%v %v` failed: %v %v (%v)", name, strings.Join(args, " "), stderr.String(), stdout.String(), err) } return stdout.String(), nil