This supports creating images from layers and mounting them
for running a container.
Not supported yet are:
* Creating diffs between images/containers
* Creating layers for new images from a device-mapper container
This interface matches the device-mapper implementation (DeviceSetDM)
but is free from any dependencies. This allows core docker code
to refer to a DeviceSet without having an explicit dependency on
the devmapper package.
This is important, because the devmapper package has external
dependencies which are not wanted in the docker client app, as it
needs to run with minimal dependencies in the docker image.
In some builds the main docker binary is not statically linked,
and as such not usable in as the .dockerinit binary, for those
cases we look for a separately shipped docker-init binary and
use that instead.
This is a module that uses the device-mapper create CoW snapshots
You instantiate a DeviceSetDM object on a specified root (/var/lib/docker),
and it will create a subdirectory there called "loopback". It will
contain two sparse files which are loopback mounted into
a thin-pool device-mapper device called "docker-pool".
We then create a base snapshot in the pool with an empty filesystem
which can be used as a base for docker snapshots. It also keeps track
of the mapping between docker image ids and the snapshots in the pool.
Typical use of is something like (without error checking):
devices = NewDeviceSetDM("/var/lib/docker")
devices.AddDevice(imageId, "") // "" is the base image id
devices.MountDevice(imageId, "/mnt/image")
... extract base image to /mnt/image
devices.AddDevice(containerId, imageId)
devices.MountDevice(containerId, "/mnt/container")
... start container at /mnt/container
We're officially a first-class Gentoo citizen now, which is very exciting. Many thanks to @gregkh for helping us get here.
I started just adapting sections of language in this document, and realized several bits needed to just be rewritten entirely to be more clear.
mostly because I've been failing at getting docker `0.6.2` working with
docker-registry `0.6.0` with regard to login and push. I suspect there
may be some mismatched expectations between `auth.ResolveAuthConfig` and
`registry.ResolveRepositoryName`, but I haven't done enough research or
experimentation to think it's anything more than user error. More tests
are good, no?
We never want the container to be in the same process group as the
daemon, as then the container will receive signals sent to the
process group of the container.
Add simple workaround for #1755 to contrib/mkimage-debian.sh
Add simple echo patch in contrib/mkimage-debian.sh to prevent init scripts from running during apt-get installs/updates
Add `apt-get clean` to mkimage-debian.sh for slightly smaller images
Add more small apt tweaks to mkimage-debian.sh thanks to @jpetazzo and @spahl