From c669b8d1568633c68bd915561ceb2e5ecc1bfc6a Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Sun, 12 Jun 2016 20:38:45 +0800 Subject: [PATCH] Adjust man pages for create start split Signed-off-by: Qiang Huang --- man/runc-create.8.md | 26 ++++++++++++++++++++++++++ man/runc-run.8.md | 28 ++++++++++++++++++++++++++++ man/runc-start.8.md | 23 ++++------------------- man/runc.8.md | 3 ++- start.go | 4 ++-- 5 files changed, 62 insertions(+), 22 deletions(-) create mode 100644 man/runc-create.8.md create mode 100644 man/runc-run.8.md diff --git a/man/runc-create.8.md b/man/runc-create.8.md new file mode 100644 index 000000000..c70217b85 --- /dev/null +++ b/man/runc-create.8.md @@ -0,0 +1,26 @@ +# NAME + runc create - create a container + +# SYNOPSIS + runc create [command options] + +Where "" 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 create command creates an instance of a container for a bundle. The bundle +is a directory with a specification file named "config.json" and a root +filesystem. + +The specification file includes an args parameter. The args parameter is used +to specify command(s) that get run when the container is started. To change the +command(s) that get executed on start, edit the args parameter of the spec. See +"runc spec --help" for more explanation. + +# OPTIONS + --bundle value, -b value path to the root of the bundle directory, defaults to the current directory + --console value specify the pty slave path for use with the container + --pid-file value specify the file to write the process id to + --no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk + --no-new-keyring do not create a new session keyring for the container. This will cause the container to inherit the calling processes session key diff --git a/man/runc-run.8.md b/man/runc-run.8.md new file mode 100644 index 000000000..b5c6053ae --- /dev/null +++ b/man/runc-run.8.md @@ -0,0 +1,28 @@ +# NAME + runc run - create and run a container + +# SYNOPSIS + runc run [command options] + +Where "" 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 run command creates an instance of a container for a bundle. The bundle +is a directory with a specification file named "config.json" and a root +filesystem. + +The specification file includes an args parameter. The args parameter is used +to specify command(s) that get run when the container is started. To change the +command(s) that get executed on start, edit the args parameter of the spec. See +"runc spec --help" for more explanation. + +# OPTIONS + --bundle value, -b value path to the root of the bundle directory, defaults to the current directory + --console value specify the pty slave path for use with the container + --detach, -d detach from the container's process + --pid-file value specify the file to write the process id to + --no-subreaper disable the use of the subreaper used to reap reparented processes + --no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk + --no-new-keyring do not create a new session keyring for the container. This will cause the container to inherit the calling processes session key diff --git a/man/runc-start.8.md b/man/runc-start.8.md index dfc9035fa..2791a0452 100644 --- a/man/runc-start.8.md +++ b/man/runc-start.8.md @@ -1,27 +1,12 @@ # NAME - runc start - create and run a container + runc start - start signals a created container to execute the user defined process # SYNOPSIS - runc start [command options] + runc start Where "" 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 creates an instance of a container for a bundle. The bundle -is a directory with a specification file named "config.json" and a root -filesystem. - -The specification file includes an args parameter. The args parameter is used -to specify command(s) that get run when the container is started. To change the -command(s) that get executed on start, edit the args parameter of the spec. See -"runc spec --help" for more explanation. - -# OPTIONS - --bundle value, -b value path to the root of the bundle directory, defaults to the current directory - --console value specify the pty slave path for use with the container - --detach, -d detach from the container's process - --pid-file value specify the file to write the process id to - --no-subreaper disable the use of the subreaper used to reap reparented processes - --no-pivot do not use pivot root to jail process inside rootfs. This should be used whenever the rootfs is on top of a ramdisk +# DESCRIPTIONa + The start command signals the container to start the user's defined process. diff --git a/man/runc.8.md b/man/runc.8.md index 16d603fbc..b5a8c54f6 100644 --- a/man/runc.8.md +++ b/man/runc.8.md @@ -39,8 +39,9 @@ value for "bundle" is the current directory. ps displays the processes running inside a container restore restore a container from a previous checkpoint resume resumes all processes that have been previously paused + run create and run a container spec create a new specification file - start create and run a container + start executes the user defined process in a created container state output the state of a container update update container resource constraints help, h Shows a list of commands or help for one command diff --git a/start.go b/start.go index b89c509a5..17e64c47d 100644 --- a/start.go +++ b/start.go @@ -9,13 +9,13 @@ import ( var startCommand = cli.Command{ Name: "start", - Usage: "start signals a created container to execute the user defined process", + Usage: "executes the user defined process in a created container", ArgsUsage: ` Where "" 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.`, + Description: `The start command executes the user defined process in a created container.`, Action: func(context *cli.Context) error { container, err := getContainer(context) if err != nil {