github.com/netbrain/docker@v1.9.0-rc2/docs/reference/commandline/volume_create.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "volume create"
     4  description = "The volume create command description and usage"
     5  keywords = ["volume, create"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  +++
     9  <![end-metadata]-->
    10  
    11  # volume create
    12  
    13      Usage: docker volume create [OPTIONS]
    14  
    15      Create a volume
    16  
    17        -d, --driver=local    Specify volume driver name
    18        --help=false          Print usage
    19        --name=               Specify volume name
    20        -o, --opt=map[]       Set driver specific options
    21  
    22  Creates a new volume that containers can consume and store data in. If a name is not specified, Docker generates a random name. You create a volume and then configure the container to use it, for example:
    23  
    24    $ docker volume create --name hello
    25    hello
    26    $ docker run -d -v hello:/world busybox ls /world
    27  
    28  The mount is created inside the container's `/src` directory. Docker does not support relative paths for mount points inside the container.
    29  
    30  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.
    31  
    32  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:
    33  
    34  ```
    35  A volume named  %s  already exists with the %s driver. Choose a different volume name.
    36  ```
    37  
    38  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.   
    39  
    40  ## Driver specific options
    41  
    42  Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options:
    43  
    44    $ docker volume create --driver fake --opt tardis=blue --opt timey=wimey
    45  
    46  These options are passed directly to the volume driver. Options for
    47  different volume drivers may do different things (or nothing at all).
    48  
    49  *Note*: The built-in `local` volume driver does not currently accept any options.