mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user