mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
bb6a747825
By adding detach to runc the container process is the only thing running on the system is the containers process. This allows better usage of memeory and no runc process being long lived. With this addition you also need a delete command because the detached container will not be able to remove state and the left over cgroups directories. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
16 lines
335 B
Go
16 lines
335 B
Go
package main
|
|
|
|
import "github.com/codegangsta/cli"
|
|
|
|
var deleteCommand = cli.Command{
|
|
Name: "delete",
|
|
Usage: "delete any resources held by the container often used with detached containers",
|
|
Action: func(context *cli.Context) {
|
|
container, err := getContainer(context)
|
|
if err != nil {
|
|
fatal(err)
|
|
}
|
|
destroy(container)
|
|
},
|
|
}
|