Browse code

docs: add note to volume-plugins

The /var/lib/docker directory is reserved for
docker, and should not be touched by plugins.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2016/01/04 23:42:03
Showing 1 changed files
... ...
@@ -15,7 +15,7 @@ storage systems, such as Amazon EBS, and enable data volumes to persist beyond
15 15
 the lifetime of a single Docker host. See the [plugin documentation](plugins.md)
16 16
 for more information.
17 17
 
18
-# Command-line changes
18
+## Command-line changes
19 19
 
20 20
 A volume plugin makes use of the `-v`and `--volume-driver` flag on the `docker run` command.  The `-v` flag accepts a volume name and the `--volume-driver` flag a driver type, for example: 
21 21
 
... ...
@@ -32,13 +32,13 @@ server to another.
32 32
 By specifying a `volumedriver` in conjunction with a `volumename`, users can use plugins such as [Flocker](https://clusterhq.com/docker-plugin/) to manage volumes external to a single host, such as those on EBS. 
33 33
 
34 34
 
35
-# Create a VolumeDriver
35
+## Create a VolumeDriver
36 36
 
37 37
 The container creation endpoint (`/containers/create`) accepts a `VolumeDriver`
38 38
 field of type `string` allowing to specify the name of the driver. It's default
39 39
 value of `"local"` (the default driver for local volumes).
40 40
 
41
-# Volume plugin protocol
41
+## Volume plugin protocol
42 42
 
43 43
 If a plugin registers itself as a `VolumeDriver` when activated, then it is
44 44
 expected to provide writeable paths on the host filesystem for the Docker
... ...
@@ -47,6 +47,10 @@ daemon to provide to containers to consume.
47 47
 The Docker daemon handles bind-mounting the provided paths into user
48 48
 containers.
49 49
 
50
+> **Note**: Volume plugins should *not* write data to the `/var/lib/docker/`
51
+> directory, including `/var/lib/docker/volumes`. The `/var/lib/docker/`
52
+> directory is reserved for Docker.
53
+
50 54
 ### /VolumeDriver.Create
51 55
 
52 56
 **Request**: