Skip to content

Docker Experimental with native checkpoint/restore support using CRIU

Pre-release
Pre-release
Compare
Choose a tag to compare
@boucher boucher released this 12 Nov 20:16

Last Update: 2015-11-12

For easy testing and experimenting, below you can find a compiled version of Docker Experimental v1.10.0 with native checkpoint and restore functionality (compiled from the cr-combined branch of boucher/docker).

Also, a compiled version of CRIU v1.6 and libprotobuf (required by CRIU), courtesy of @SaiedKazemi (see notes at: https://github.com/SaiedKazemi/docker/releases).

Example use:

docker run -d --publish-service test busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
If you examine the logs at this point, you should see prints of an increasing integer counter.

docker checkpoint
docker restore
Checking the logs again should show that the counter is still increasing. (Waiting a bit between checkpoint and restore can increase your confidence that the process actually stopped for a while)

NOTE: networking is currently not working. Once you restore a container, it will not have network connectivity.

NOTE: you may need additional dependencies:

$ ldd which criu
linux-vdso.so.1 => (0x00007fff7f79a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4a1bb5e000)
libprotobuf-c.so.0 => /usr/lib/x86_64-linux-gnu/libprotobuf-c.so.0 (0x00007f4a1b94e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4a1b749000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4a1b384000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4a1bd84000)