From d8f50e5dd1e70fa7dba965999c3176e33853e415 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 4 Jan 2016 15:42:03 +0100 Subject: [PATCH] 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 --- docs/extend/plugins_volume.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/extend/plugins_volume.md b/docs/extend/plugins_volume.md index a2507f91..7a1471e5 100644 --- a/docs/extend/plugins_volume.md +++ b/docs/extend/plugins_volume.md @@ -15,7 +15,7 @@ storage systems, such as Amazon EBS, and enable data volumes to persist beyond the lifetime of a single Docker host. See the [plugin documentation](plugins.md) for more information. -# Command-line changes +## Command-line changes 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: @@ -32,13 +32,13 @@ server to another. 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. -# Create a VolumeDriver +## Create a VolumeDriver The container creation endpoint (`/containers/create`) accepts a `VolumeDriver` field of type `string` allowing to specify the name of the driver. It's default value of `"local"` (the default driver for local volumes). -# Volume plugin protocol +## Volume plugin protocol If a plugin registers itself as a `VolumeDriver` when activated, then it is expected to provide writeable paths on the host filesystem for the Docker @@ -47,6 +47,10 @@ daemon to provide to containers to consume. The Docker daemon handles bind-mounting the provided paths into user containers. +> **Note**: Volume plugins should *not* write data to the `/var/lib/docker/` +> directory, including `/var/lib/docker/volumes`. The `/var/lib/docker/` +> directory is reserved for Docker. + ### /VolumeDriver.Create **Request**: