From ef99ac464b9bf86151660972d47e89a04861ae5e Mon Sep 17 00:00:00 2001 From: David Calavera Date: Tue, 19 May 2015 13:05:25 -0700 Subject: [PATCH] Volumes refactor and external plugin implementation. Signed by all authors: Signed-off-by: Michael Crosby Signed-off-by: Arnaud Porterie Signed-off-by: David Calavera Signed-off-by: Jeff Lindsay Signed-off-by: Alexander Morozov Signed-off-by: Luke Marsden Signed-off-by: David Calavera --- docs/sources/reference/commandline/cli.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index a4a44fbb54..e1c9f56ad3 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -1000,7 +1000,8 @@ Creates a new container. --security-opt=[] Security options -t, --tty=false Allocate a pseudo-TTY -u, --user="" Username or UID - -v, --volume=[] Bind mount a volume + -v, --volume=[] Bind mount a volume, or specify name for volume plugin + --volume-driver= Optional volume driver (plugin name) for the container --volumes-from=[] Mount volumes from the specified container(s) -w, --workdir="" Working directory inside the container @@ -1970,7 +1971,8 @@ To remove an image using its digest: --sig-proxy=true Proxy received signals to the process -t, --tty=false Allocate a pseudo-TTY -u, --user="" Username or UID (format: [:]) - -v, --volume=[] Bind mount a volume + -v, --volume=[] Bind mount a volume, or specify name for volume plugin + --volume-driver= Optional volume driver (plugin name) for the container --volumes-from=[] Mount volumes from the specified container(s) -w, --workdir="" Working directory inside the container @@ -2066,6 +2068,18 @@ binary (such as that provided by [https://get.docker.com]( https://get.docker.com)), you give the container the full access to create and manipulate the host's Docker daemon. + $ docker run -ti -v volumename:/data --volume-driver=flocker busybox sh + +By specifying a volume name in conjunction with a volume driver, volume plugins +such as [Flocker](https://clusterhq.com/docker-plugin/), once installed, can be +used to manage volumes external to a single host, such as those on EBS. In this +example, "volumename" is passed through to the volume plugin as a user-given +name for the volume which allows the plugin to associate it with an external +volume beyond the lifetime of a single container or container host. This can be +used, for example, to move a stateful container from one server to another. + +The `volumename` must not begin with a `/`. + $ docker run -p 127.0.0.1:80:8080 ubuntu bash This binds port `8080` of the container to port `80` on `127.0.0.1` of