diff --git a/docs/reference/commandline/checkpoint.md b/docs/reference/commandline/checkpoint.md index 1c2f670724..22053982c2 100644 --- a/docs/reference/commandline/checkpoint.md +++ b/docs/reference/commandline/checkpoint.md @@ -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.