From 6b496e4bf02110e3ebc50fec186a93e22f2a573a Mon Sep 17 00:00:00 2001 From: wangwenqi Date: Wed, 20 Jun 2018 11:17:44 +0800 Subject: [PATCH] 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 --- cli/create.go | 4 ++++ cli/run.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cli/create.go b/cli/create.go index d7e5abec8b..5067d53c41 100644 --- a/cli/create.go +++ b/cli/create.go @@ -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) diff --git a/cli/run.go b/cli/run.go index 86f4779f24..ceb22880e0 100644 --- a/cli/run.go +++ b/cli/run.go @@ -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)