Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
| ... | ... |
@@ -20,7 +20,7 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 20 | 20 |
var opts createOptions |
| 21 | 21 |
|
| 22 | 22 |
cmd := &cobra.Command{
|
| 23 |
- Use: "create CONTAINER CHECKPOINT", |
|
| 23 |
+ Use: "create [OPTIONS] CONTAINER CHECKPOINT", |
|
| 24 | 24 |
Short: "Create a checkpoint from a running container", |
| 25 | 25 |
Args: cli.ExactArgs(2), |
| 26 | 26 |
RunE: func(cmd *cobra.Command, args []string) error {
|
| ... | ... |
@@ -31,8 +31,8 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 31 | 31 |
} |
| 32 | 32 |
|
| 33 | 33 |
flags := cmd.Flags() |
| 34 |
- flags.BoolVar(&opts.leaveRunning, "leave-running", false, "leave the container running after checkpoint") |
|
| 35 |
- flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "use a custom checkpoint storage directory") |
|
| 34 |
+ flags.BoolVar(&opts.leaveRunning, "leave-running", false, "Leave the container running after checkpoint") |
|
| 35 |
+ flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "Use a custom checkpoint storage directory") |
|
| 36 | 36 |
|
| 37 | 37 |
return cmd |
| 38 | 38 |
} |
| ... | ... |
@@ -20,7 +20,7 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 20 | 20 |
var opts listOptions |
| 21 | 21 |
|
| 22 | 22 |
cmd := &cobra.Command{
|
| 23 |
- Use: "ls CONTAINER", |
|
| 23 |
+ Use: "ls [OPTIONS] CONTAINER", |
|
| 24 | 24 |
Aliases: []string{"list"},
|
| 25 | 25 |
Short: "List checkpoints for a container", |
| 26 | 26 |
Args: cli.ExactArgs(1), |
| ... | ... |
@@ -30,7 +30,7 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 30 | 30 |
} |
| 31 | 31 |
|
| 32 | 32 |
flags := cmd.Flags() |
| 33 |
- flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "use a custom checkpoint storage directory") |
|
| 33 |
+ flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "Use a custom checkpoint storage directory") |
|
| 34 | 34 |
|
| 35 | 35 |
return cmd |
| 36 | 36 |
|
| ... | ... |
@@ -17,7 +17,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 17 | 17 |
var opts removeOptions |
| 18 | 18 |
|
| 19 | 19 |
cmd := &cobra.Command{
|
| 20 |
- Use: "rm CONTAINER CHECKPOINT", |
|
| 20 |
+ Use: "rm [OPTIONS] CONTAINER CHECKPOINT", |
|
| 21 | 21 |
Aliases: []string{"remove"},
|
| 22 | 22 |
Short: "Remove a checkpoint", |
| 23 | 23 |
Args: cli.ExactArgs(2), |
| ... | ... |
@@ -27,7 +27,7 @@ func newRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 | 29 |
flags := cmd.Flags() |
| 30 |
- flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "use a custom checkpoint storage directory") |
|
| 30 |
+ flags.StringVarP(&opts.checkpointDir, "checkpoint-dir", "", "", "Use a custom checkpoint storage directory") |
|
| 31 | 31 |
|
| 32 | 32 |
return cmd |
| 33 | 33 |
} |
| ... | ... |
@@ -33,7 +33,7 @@ migration of a server from one machine to another. This is possible with the |
| 33 | 33 |
current implementation, but not currently a priority (and so the workflow is |
| 34 | 34 |
not optimized for the task). |
| 35 | 35 |
|
| 36 |
-## Using Checkpoint & Restore |
|
| 36 |
+## Using checkpoint & restore |
|
| 37 | 37 |
|
| 38 | 38 |
A new top level command `docker checkpoint` is introduced, with three subcommands: |
| 39 | 39 |
- `create` (creates a new checkpoint) |
| ... | ... |
@@ -48,7 +48,8 @@ The options for checkpoint create: |
| 48 | 48 |
|
| 49 | 49 |
Create a checkpoint from a running container |
| 50 | 50 |
|
| 51 |
- --leave-running=false leave the container running after checkpoint |
|
| 51 |
+ --leave-running=false Leave the container running after checkpoint |
|
| 52 |
+ --checkpoint-dir Use a custom checkpoint storage directory |
|
| 52 | 53 |
|
| 53 | 54 |
And to restore a container: |
| 54 | 55 |
|
| ... | ... |
@@ -71,7 +72,7 @@ in between running/checkpoint/restoring you should see that the counter |
| 71 | 71 |
increases while the process is running, stops while it's checkpointed, and |
| 72 | 72 |
resumes from the point it left off once you restore. |
| 73 | 73 |
|
| 74 |
-## Current Limitation |
|
| 74 |
+## Current limitation |
|
| 75 | 75 |
|
| 76 | 76 |
seccomp is only supported by CRIU in very up to date kernels. |
| 77 | 77 |
|