From 5b54323be802fc93ae4d2054b81586e66c660727 Mon Sep 17 00:00:00 2001 From: Kun Zhang Date: Sun, 4 Oct 2015 20:09:51 +0800 Subject: [PATCH] volume create error on conflict option Signed-off-by: Kun Zhang Upstream-commit: eb960e4eb7f5c4aab380fdcf280155e750de3305 Component: cli --- .../cli/docs/reference/commandline/volume_create.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/cli/docs/reference/commandline/volume_create.md b/components/cli/docs/reference/commandline/volume_create.md index 3684bda6d5..35f8a00b38 100644 --- a/components/cli/docs/reference/commandline/volume_create.md +++ b/components/cli/docs/reference/commandline/volume_create.md @@ -29,6 +29,14 @@ The mount is created inside the container's `/src` directory. Docker does not su Multiple containers can use the same volume in the same time period. This is useful if two containers need access to shared data. For example, if one container writes and the other reads the data. +Volume names must be unique among drivers. This means you cannot use the same volume name with two different drivers. If you attempt this `docker` returns an error: + +``` +A volume named %s already exists with the %s driver. Choose a different volume name. +``` + +If you specify a volume name already in use on the current driver, Docker assumes you want to re-use the existing volume and does not return an error. + ## Driver specific options Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options: