Update for docker checkpoint

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
yuexiao-wang 2016-11-08 16:15:09 +08:00
parent 3baa727ed1
commit cd2269a456
3 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
var opts createOptions var opts createOptions
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "create CONTAINER CHECKPOINT", Use: "create [OPTIONS] CONTAINER CHECKPOINT",
Short: "Create a checkpoint from a running container", Short: "Create a checkpoint from a running container",
Args: cli.ExactArgs(2), Args: cli.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
@ -31,8 +31,8 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.BoolVar(&opts.leaveRunning, "leave-running", false, "leave the container running after checkpoint") flags.BoolVar(&opts.leaveRunning, "leave-running", false, "Leave the container running after checkpoint")
flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "use a custom checkpoint storage directory") flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "Use a custom checkpoint storage directory")
return cmd return cmd
} }

View File

@ -20,7 +20,7 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
var opts listOptions var opts listOptions
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "ls CONTAINER", Use: "ls [OPTIONS] CONTAINER",
Aliases: []string{"list"}, Aliases: []string{"list"},
Short: "List checkpoints for a container", Short: "List checkpoints for a container",
Args: cli.ExactArgs(1), Args: cli.ExactArgs(1),
@ -30,7 +30,7 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "use a custom checkpoint storage directory") flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "Use a custom checkpoint storage directory")
return cmd return cmd

View File

@ -17,7 +17,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
var opts removeOptions var opts removeOptions
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "rm CONTAINER CHECKPOINT", Use: "rm [OPTIONS] CONTAINER CHECKPOINT",
Aliases: []string{"remove"}, Aliases: []string{"remove"},
Short: "Remove a checkpoint", Short: "Remove a checkpoint",
Args: cli.ExactArgs(2), Args: cli.ExactArgs(2),
@ -27,7 +27,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
} }
flags := cmd.Flags() flags := cmd.Flags()
flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "use a custom checkpoint storage directory") flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "Use a custom checkpoint storage directory")
return cmd return cmd
} }