Explorar o código

Update for docker checkpoint

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
yuexiao-wang %!s(int64=8) %!d(string=hai) anos
pai
achega
90ce77e46a

+ 3 - 3
cli/command/checkpoint/create.go

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

+ 2 - 2
cli/command/checkpoint/list.go

@@ -20,7 +20,7 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
 	var opts listOptions
 
 	cmd := &cobra.Command{
-		Use:     "ls CONTAINER",
+		Use:     "ls [OPTIONS] CONTAINER",
 		Aliases: []string{"list"},
 		Short:   "List checkpoints for a container",
 		Args:    cli.ExactArgs(1),
@@ -30,7 +30,7 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
 	}
 
 	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
 

+ 2 - 2
cli/command/checkpoint/remove.go

@@ -17,7 +17,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
 	var opts removeOptions
 
 	cmd := &cobra.Command{
-		Use:     "rm CONTAINER CHECKPOINT",
+		Use:     "rm [OPTIONS] CONTAINER CHECKPOINT",
 		Aliases: []string{"remove"},
 		Short:   "Remove a checkpoint",
 		Args:    cli.ExactArgs(2),
@@ -27,7 +27,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
 	}
 
 	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
 }

+ 4 - 3
experimental/checkpoint-restore.md

@@ -33,7 +33,7 @@ migration of a server from one machine to another. This is possible with the
 current implementation, but not currently a priority (and so the workflow is
 not optimized for the task).
 
-## Using Checkpoint & Restore
+## Using checkpoint & restore
 
 A new top level command `docker checkpoint` is introduced, with three subcommands:
 - `create` (creates a new checkpoint)
@@ -48,7 +48,8 @@ The options for checkpoint create:
 
     Create a checkpoint from a running container
 
-      --leave-running=false    leave the container running after checkpoint
+      --leave-running=false    Leave the container running after checkpoint
+      --checkpoint-dir         Use a custom checkpoint storage directory
 
 And to restore a container:
 
@@ -71,7 +72,7 @@ in between running/checkpoint/restoring you should see that the counter
 increases while the process is running, stops while it's checkpointed, and
 resumes from the point it left off once you restore.
 
-## Current Limitation
+## Current limitation
 
 seccomp is only supported by CRIU in very up to date kernels.