@@ -18,14 +18,14 @@ checkpoint and restore in Docker is available in this
18
18
19
19
### Installing CRIU
20
20
21
- If you use a Debian system, you can add the CRIU PPA and install with apt-get
21
+ If you use a Debian system, you can add the CRIU PPA and install with ` apt-get `
22
22
[ from the criu launchpad] ( https://launchpad.net/~criu/+archive/ubuntu/ppa ) .
23
23
24
24
Alternatively, you can [ build CRIU from source] ( https://criu.org/Installation ) .
25
25
26
- You need at least version 2.0 of CRIU to run checkpoint/ restore in Docker.
26
+ You need at least version 2.0 of CRIU to run checkpoint and restore in Docker.
27
27
28
- ### Use cases for checkpoint & restore
28
+ ### Use cases for checkpoint and restore
29
29
30
30
This feature is currently focused on single-host use cases for checkpoint and<
10000
/div>
31
31
restore. Here are a few:
@@ -35,21 +35,22 @@ restore. Here are a few:
35
35
- "Rewinding" processes to an earlier point in time
36
36
- "Forensic debugging" of running processes
37
37
38
- Another primary use case of checkpoint & restore outside of Docker is the live
38
+ Another primary use case of checkpoint and restore outside of Docker is the live
39
39
migration of a server from one machine to another. This is possible with the
40
40
current implementation, but not currently a priority (and so the workflow is
41
41
not optimized for the task).
42
42
43
- ### Using checkpoint & restore
43
+ ### Using checkpoint and restore
44
44
45
45
A new top level command ` docker checkpoint ` is introduced, with three subcommands:
46
- - ` create ` (creates a new checkpoint)
47
- - ` ls ` (lists existing checkpoints)
48
- - ` rm ` (deletes an existing checkpoint)
49
46
50
- Additionally, a ` --checkpoint ` flag is added to the container start command.
47
+ - ` docker checkpoint create ` (creates a new checkpoint)
48
+ - ` docker checkpoint ls ` (lists existing checkpoints)
49
+ - ` docker checkpoint rm ` (deletes an existing checkpoint)
51
50
52
- The options for checkpoint create:
51
+ Additionally, a ` --checkpoint ` flag is added to the ` docker container start ` command.
52
+
53
+ The options for ` docker checkpoint create ` :
53
54
54
55
``` console
55
56
Usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT
@@ -66,7 +67,7 @@ And to restore a container:
66
67
Usage: docker start --checkpoint CHECKPOINT_ID [OTHER OPTIONS] CONTAINER
67
68
```
68
69
69
- Example of using checkpoint & restore on a container:
70
+ Example of using checkpoint and restore on a container:
70
71
71
72
``` console
72
73
$ docker run --security-opt=seccomp:unconfined --name cr -d busybox /bin/sh -c ' i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
@@ -79,7 +80,7 @@ $ docker start --checkpoint checkpoint1 cr
79
80
abc0123
80
81
```
81
82
82
- This process just logs an incrementing counter to stdout. If you ` docker logs `
83
+ This process just logs an incrementing counter to stdout. If you run ` docker logs `
83
84
in between running/checkpoint/restoring you should see that the counter
84
85
increases while the process is running, stops while it's checkpointed, and
85
86
resumes from the point it left off once you restore.
0 commit comments