Add create and start command for container lifecycle

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2016-05-13 16:54:16 -07:00
parent 75fb70be01
commit 3fe7d7f31e
13 changed files with 209 additions and 29 deletions
+27
View File
@@ -0,0 +1,27 @@
package main
import (
"syscall"
"github.com/codegangsta/cli"
)
var startCommand = cli.Command{
Name: "start",
Usage: "start signals a created container to execute the users defined process",
ArgsUsage: `<container-id>
Where "<container-id>" is your name for the instance of the container that you
are starting. The name you provide for the container instance must be unique on
your host.`,
Description: `The start command signals the container to start the user's defined process.`,
Action: func(context *cli.Context) {
container, err := getContainer(context)
if err != nil {
fatal(err)
}
if err := container.Signal(syscall.SIGCONT); err != nil {
fatal(err)
}
},
}