cli: add no-pivot flag to be compatible with docker in ramdisk

This commit add a no-pivot flag (just a warning tip) in kata-runtime create and run cmd.

Fixes: #409 , #134

Signed-off-by: wenqi wang wangwenqi01@baidu.com
This commit is contained in:
wangwenqi 2018-06-20 11:17:44 +08:00
parent 4f102f8e8f
commit 6b496e4bf0
2 changed files with 8 additions and 0 deletions

View File

@ -56,6 +56,10 @@ var createCLICommand = cli.Command{
Value: "",
Usage: "specify the file to write the process id to",
},
cli.BoolFlag{
Name: "no-pivot",
Usage: "warning: this flag is meaningless to kata-runtime, just defined in order to be compatible with docker in ramdisk",
},
},
Action: func(context *cli.Context) error {
runtimeConfig, ok := context.App.Metadata["runtimeConfig"].(oci.RuntimeConfig)

View File

@ -52,6 +52,10 @@ var runCLICommand = cli.Command{
Name: "detach, d",
Usage: "detach from the container's process",
},
cli.BoolFlag{
Name: "no-pivot",
Usage: "warning: this flag is meaningless to kata-runtime, just defined in order to be compatible with docker in ramdisk",
},
},
Action: func(context *cli.Context) error {
runtimeConfig, ok := context.App.Metadata["runtimeConfig"].(oci.RuntimeConfig)