mirror of https://github.com/docker/cli.git
docs: some minor touch-ups in checkpoint reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8c73a93925
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8260476a06
commit
adb01ca79d
|
@ -18,14 +18,14 @@ checkpoint and restore in Docker is available in this
|
|||
|
||||
### Installing CRIU
|
||||
|
||||
If you use a Debian system, you can add the CRIU PPA and install with apt-get
|
||||
If you use a Debian system, you can add the CRIU PPA and install with `apt-get`
|
||||
[from the criu launchpad](https://launchpad.net/~criu/+archive/ubuntu/ppa).
|
||||
|
||||
Alternatively, you can [build CRIU from source](https://criu.org/Installation).
|
||||
|
||||
You need at least version 2.0 of CRIU to run checkpoint/restore in Docker.
|
||||
You need at least version 2.0 of CRIU to run checkpoint and restore in Docker.
|
||||
|
||||
### Use cases for checkpoint & restore
|
||||
### Use cases for checkpoint and restore
|
||||
|
||||
This feature is currently focused on single-host use cases for checkpoint and
|
||||
restore. Here are a few:
|
||||
|
@ -35,21 +35,22 @@ restore. Here are a few:
|
|||
- "Rewinding" processes to an earlier point in time
|
||||
- "Forensic debugging" of running processes
|
||||
|
||||
Another primary use case of checkpoint & restore outside of Docker is the live
|
||||
Another primary use case of checkpoint and restore outside of Docker is the live
|
||||
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 and restore
|
||||
|
||||
A new top level command `docker checkpoint` is introduced, with three subcommands:
|
||||
- `create` (creates a new checkpoint)
|
||||
- `ls` (lists existing checkpoints)
|
||||
- `rm` (deletes an existing checkpoint)
|
||||
|
||||
Additionally, a `--checkpoint` flag is added to the container start command.
|
||||
- `docker checkpoint create` (creates a new checkpoint)
|
||||
- `docker checkpoint ls` (lists existing checkpoints)
|
||||
- `docker checkpoint rm` (deletes an existing checkpoint)
|
||||
|
||||
The options for checkpoint create:
|
||||
Additionally, a `--checkpoint` flag is added to the `docker container start` command.
|
||||
|
||||
The options for `docker checkpoint create`:
|
||||
|
||||
```console
|
||||
Usage: docker checkpoint create [OPTIONS] CONTAINER CHECKPOINT
|
||||
|
@ -66,7 +67,7 @@ And to restore a container:
|
|||
Usage: docker start --checkpoint CHECKPOINT_ID [OTHER OPTIONS] CONTAINER
|
||||
```
|
||||
|
||||
Example of using checkpoint & restore on a container:
|
||||
Example of using checkpoint and restore on a container:
|
||||
|
||||
```console
|
||||
$ 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
|
|||
abc0123
|
||||
```
|
||||
|
||||
This process just logs an incrementing counter to stdout. If you `docker logs`
|
||||
This process just logs an incrementing counter to stdout. If you run `docker logs`
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue