adding support for --bundle -b to start, restore, and spec; fixes issue #310

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown
2015-10-27 14:23:44 -05:00
parent db21ac7750
commit 8b19581694
4 changed files with 45 additions and 42 deletions
+10 -9
View File
@@ -22,18 +22,19 @@ var startCommand = cli.Command{
Usage: "create and run a container",
Flags: []cli.Flag{
cli.StringFlag{
Name: "config-file, c",
Value: "config.json",
Usage: "path to spec config file",
},
cli.StringFlag{
Name: "runtime-file, r",
Value: "runtime.json",
Usage: "path to runtime config file",
Name: "bundle, b",
Value: "",
Usage: "path to the root of the bundle directory",
},
},
Action: func(context *cli.Context) {
spec, rspec, err := loadSpec(context.String("config-file"), context.String("runtime-file"))
bundle := context.String("bundle")
if bundle != "" {
if err := os.Chdir(bundle); err != nil {
fatal(err)
}
}
spec, rspec, err := loadSpec(specConfig, runtimeConfig)
if err != nil {
fatal(err)
}