moby/daemon/graphdriver
Alexander Larsson 453552c838 Add overlayfs graph backend
This backend uses the overlayfs union filesystem for containers
plus hard link file sharing for images.

Each container/image can have a "root" subdirectory which is a plain
filesystem hierarchy, or they can use overlayfs.

If they use overlayfs there is a "upper" directory and a "lower-id"
file, as well as "merged" and "work" directories. The "upper"
directory has the upper layer of the overlay, and "lower-id" contains
the id of the parent whose "root" directory shall be used as the lower
layer in the overlay. The overlay itself is mounted in the "merged"
directory, and the "work" dir is needed for overlayfs to work.

When a overlay layer is created there are two cases, either the
parent has a "root" dir, then we start out with a empty "upper"
directory overlaid on the parents root. This is typically the
case with the init layer of a container which is based on an image.
If there is no "root" in the parent, we inherit the lower-id from
the parent and start by making a copy if the parents "upper" dir.
This is typically the case for a container layer which copies
its parent -init upper layer.

Additionally we also have a custom implementation of ApplyLayer
which makes a recursive copy of the parent "root" layer using
hardlinks to share file data, and then applies the layer on top
of that. This means all chile images share file (but not directory)
data with the parent.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-10-28 11:31:30 +01:00
..
aufs Mass gofmt 2014-10-24 15:11:48 -07:00
btrfs graphdriver interface name change, typo fix 2014-09-16 15:10:32 -07:00
devmapper Mass gofmt 2014-10-24 15:11:48 -07:00
graphtest update go import path and libcontainer 2014-07-24 22:19:50 +00:00
overlayfs Add overlayfs graph backend 2014-10-28 11:31:30 +01:00
vfs Use archive.CopyWithTar in vfs.Create 2014-10-27 11:38:22 -07:00
driver.go Add overlayfs graph backend 2014-10-28 11:31:30 +01:00
fsdiff.go Mass gofmt 2014-10-24 15:11:48 -07:00