Changes

Jump to: navigation, search

Docker

89 bytes removed, 16:51, 8 April 2015
minor formatting fixes + rm obsolete paragraph
watch this short demo
'''[https://www.youtube.com/watch?v=HFt9v6yqsXo video]'''
to see how it works. Source files for Docker 1.5 C/R is are at this
'''[https://github.com/SaiedKazemi/docker/tree/cr repo]'''.
The '''[https://github.com/SaiedKazemi/docker/wiki wiki]'''
page provides an overview of the project history.
Work in underway to integrate C/R into the new <code>libcontainer</code>.
For native C/R support, additional functionality was added to CRIU.
== External C/R ==
Starting with CRIU 1.3, it's is possible to checkpoint and restore a
process tree running inside a Docker container. However, it's
important to note that Docker needs native support for checkpoint
child of Docker and, from Docker's point of view, the container's
state will remain "Exited" (even after successful restore).
 
Work is in progress to add native checkpoint and restore support
to Docker. Once ready, specific commands (for example, "docker
checkpoint" and "docker restore") will use CRIU to do the actual
C/R operations while Docker continues to maintain its parent-child
relationship and container states.
It's important to re-emphasize that by checkpointing and restoring
However, because Docker by default uses the AUFS graph driver and
the AUFS module in the kernel reveals branch pathnames in
<code>/proc/<''pid>''/map_files</code>, option <code>--root </code>is used to specify the root of the
mount namespace. Once the kernel AUFS module is fixed, it won't
be necessary to specify this option anymore.
This option is used to specify the path of the external bind mounts.
Docker sets up <code>/etc/{hostname,hosts,resolv.conf} </code> as targets with
source files outside the container's mount namespace. Older versions
of Docker also bind mount <code>/.dockerinit</code>.
For example, assuming the default Docker configuration, <code>/etc/hostname</code>
in the container's mount namespace is bind mounted from the source
at <code>/var/lib/docker/containers/<''container_id>''/hostname</code>.
=== <code>--manage-cgroups</code> ===
=== <code>--evasive-devices</code> ===
Docker bind mounts <code>/dev/null </code> on <code>/dev/stdin </code> for detached containers(i.e., <code>docker run -d ...</code>). Since earlier versions of Docker used<code>/dev/null </code> in the global namespace, this option tells CRIU to treatthe global <code>/dev/null </code> and the container <code>/dev/null </code> as the same device.
== Restore Prework ==
As mentioned earlier, by default Docker uses AUFS to set up the
container's filesystem. When Docker notices that the process has
exited (due to criu CRIU dump), it dismantles the filesystem. We need
to set up the filesystem again before attempting to restore.
</pre>
Optionally, you can specify <code>-v </code> to see the commands that <code>docker_cr.sh</code>
executes. For example:

Navigation menu