This is a docker plugin that facilitates creating union mounts as docker volumes by taking advantage of docker's graph driver. It's mostly useful in testing/staging/review areas where having the latest production data and being able to manipulate it, in a carefree manner, is necessary to test features and migrations.
Supported filesystems are:
- AUFS
- Overlay
Using go get
:
$ go get -u http://github.com/Fardinak/docker-volume-unionmount
-
Run the daemon
$ docker-volume-unionmount
Available arguments:
-root
is the root directory for union mount driver's operations and volumes (defaults to /var/lib/docker-volumes/_unionmount/)-defaultfs
is the default filesystem for this driver's volumes (defaults to docker's storage driver oraufs
)
-
Create a named volume with the driver
$ docker volume create --driver unionmount -o layers=/path/to/newer/clone:/var/lib/postgresql/data pgsandbox_data
Available options:
layers
absolute path to layers of the union, from top to bottom, separated by colons:
. The upper layer will be automatically generated by the driver. (Required)filesystem
is the filesystem for this volume (defaults to driver's-defaultfs
option)
-
Use the volume in one or more containers
$ docker run -it --rm -v pgsandbox_data:/var/lib/postgresql/data postgres:latest psql
- Filesystems as separate drivers (perhpase use docker's own
graphdriver
library) - Support multilayer with Overlay
- Support Overlay2
- Logging (logrus) and Debugging mode
Also: Review mounting other named volumes as layers to a union
Docker Union Mount Volume Plugin is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.