Changes

Jump to navigation Jump to search
1,478 bytes removed ,  22:21, 31 March 2017
rewording
Line 1: Line 1: −
This HOWTO page describes how to checkpoint and restore a Docker container.
+
This article describes the status of CRIU integration with Docker, and how to use it.
 
  −
== Introduction ==
  −
 
  −
Docker wants to manage the full lifecycle of processes running inside one if its containers, which makes it important for CRIU and Docker to work closely together when trying to checkpoint and restore a container. This is being achieved by adding the ability to checkpoint and restore directly into Docker itself, powered under the hood by CRIU. This integration is a work in progress, and its status will be outlined below.  
      
== Docker Experimental ==
 
== Docker Experimental ==
   −
Checkpoint & Restore is now available in the ''experimental'' runtime mode for Docker. It is available since Docker 1.13, so every later version (like Docker 17.03) has it.
+
Naturally, Docker wants to manage the full lifecycle of processes running inside its containers, so CRIU should be run by Docker (rather than separately).
 +
This feature is available in the ''experimental'' mode for Docker (since Docker 1.13, so every later version, like Docker 17.03, should work).
    
To enable experimental features (incl. CRIU), you need to do something like this:
 
To enable experimental features (incl. CRIU), you need to do something like this:
Line 14: Line 11:  
  systemctl restart docker
 
  systemctl restart docker
   −
=== Dependencies ===
+
In addition to having a recent version of Docker, you need '''CRIU''' 2.0 or later installed on your system (see [[Installation]] for more info).
 
  −
In addition to installing version 1.13+ of Docker, you need '''CRIU''' 2.0 or later installed on your system. You also need some shared libraries on your system. The most likely things you'll need to install are '''libprotobuf-c''' and '''libnl-3'''. Here's an output of <code>ldd</code> on my system:
  −
 
  −
$ ldd `which criu`
  −
    linux-vdso.so.1 =>  (0x00007ffc09fda000)
  −
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd28b2c7000)
  −
    libprotobuf-c.so.0 => /usr/lib/x86_64-linux-gnu/libprotobuf-c.so.0 (0x00007fd28b0b7000)
  −
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd28aeb2000)
  −
    libnl-3.so.200 => /lib/x86_64-linux-gnu/libnl-3.so.200 (0x00007fd28ac98000)
  −
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd28a8d3000)
  −
    /lib64/ld-linux-x86-64.so.2 (0x000056386bb38000)
  −
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd28a5cc000)
      
=== checkpoint ===  
 
=== checkpoint ===  
Line 103: Line 88:  
       --help                    Print usage
 
       --help                    Print usage
 
   -i, --interactive            Attach container's STDIN
 
   -i, --interactive            Attach container's STDIN
  −
== Integration Status ==
  −
  −
CRIU has already been integrated into the lower level components that power Docker, namely '''runc''' and '''containerd'''. The final step in the process is to integrate with Docker itself. You can track the status of that process in [https://github.com/docker/docker/pull/22049 this pull request].
      
== Compatibility Notes ==
 
== Compatibility Notes ==
Line 158: Line 139:  
* {{torvalds.git|e4a0d3e720}} by Pavel Emelyanov
 
* {{torvalds.git|e4a0d3e720}} by Pavel Emelyanov
   −
== External Checkpoint Restore ==
+
== External checkpoint/restore ==
 
  −
{{Note| External C/R was done as proof-of-concept.  Its use is highly discouraged.}}
     −
Although it's not recommended, you can also learn more about using CRIU without integrating with docker: [[Docker_External]].
+
Although it's not recommended, you can also learn more about using CRIU without integrating with Docker. See [[Docker External]] for more info.

Navigation menu