From 2513ac252372ae9f0c3892e4eb2fe72cf07732b8 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Tue, 16 Aug 2016 10:16:05 -0700 Subject: [PATCH] Add helper for deleting a container Signed-off-by: Mrunal Patel --- oci/oci.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/oci/oci.go b/oci/oci.go index fb71fa15..2306701c 100644 --- a/oci/oci.go +++ b/oci/oci.go @@ -77,6 +77,11 @@ func (r *Runtime) StopContainer(c *Container) error { return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.path, "kill", c.name) } +// DeleteContainer deletes a container. +func (r *Runtime) DeleteContainer(c *Container) error { + return utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.path, "delete", c.name) +} + // Container respresents a runtime container. type Container struct { name string