From db789045bd59ace88c8f3e114542a4f96a7f295b Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 26 Apr 2016 15:01:24 -0700 Subject: [PATCH] Update runc in dockerfile for new commands Signed-off-by: Michael Crosby --- Dockerfile | 2 +- runtime/container.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d2deb2..3ac9450 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,7 +36,7 @@ RUN set -x \ && rm -rf "$SECCOMP_PATH" # Install runc -ENV RUNC_COMMIT bbde9c426ff363d813b8722f0744115c13b408b6 +ENV RUNC_COMMIT 9c89737e6e117a8be5a4980bc9795fe1a2b1028e RUN set -x \ && export GOPATH="$(mktemp -d)" \ && git clone git://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \ diff --git a/runtime/container.go b/runtime/container.go index 5fb11bc..e935cd0 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -521,7 +521,9 @@ func hostIDFromMap(id uint32, mp []ocs.IDMapping) int { } func (c *container) Pids() ([]int, error) { - out, err := exec.Command(c.runtime, "ps", "--format=json", c.id).CombinedOutput() + args := c.runtimeArgs + args = append(args, "ps", "--format=json", c.id) + out, err := exec.Command(c.runtime, args...).CombinedOutput() if err != nil { return nil, fmt.Errorf("%s", out) } @@ -534,7 +536,9 @@ func (c *container) Pids() ([]int, error) { func (c *container) Stats() (*Stat, error) { now := time.Now() - out, err := exec.Command(c.runtime, "events", "--stats", c.id).CombinedOutput() + args := c.runtimeArgs + args = append(args, "events", "--stats", c.id) + out, err := exec.Command(c.runtime, args...).CombinedOutput() if err != nil { return nil, fmt.Errorf("%s", out) }