teemow/conair — pull request #3 by teemow (2014-08-30 07:38:33+00:00)
Title: added snapshots and bind mounts

Share data between host and containers. You can use both at build time and run time.

# Bind
With bind mounts you can share a directory between the host and the
container.

## Example
```
$ cat Conairfile
FROM base
BIND /foo:/bar
PKG bar-app
$ conair run -bind=/foo:/bar foo-image foo-container
```

# Snapshot
With the snapshot you can initialize a container with a copy of data on the host. This will be useful if you run multiple containers with the same data, but don't want to share the directory between the containers. Snapshots are btrfs subvolumes and will be created within the `/var/lib/conair/snapshots` directory. At build time snapshots are bind mounted to the container which helps initializing the snapshot with data that will be 'copied' to the container at runtime.

## Example
```
$ cat Conairfile
FROM base
# creates a snapshot 'foo' in /var/lib/conair/snapshots/foo.
SNAPSHOT foo:/bar
PKG bar-app
$ conair run -snapshot=foo:/bar foo-image foo-container
```