github.com/tompao/docker@v1.9.1/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  
    27      $ docker run -d -v hello:/world busybox ls /world
    28  
    29  The mount is created inside the container's `/world` directory. Docker does not support relative paths for mount points inside the container.
    30  
    31  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.
    32  
    33  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:
    34  
    35  ```
    36  A volume named  %s  already exists with the %s driver. Choose a different volume name.
    37  ```
    38  
    39  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.   
    40  
    41  ## Driver specific options
    42  
    43  Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options:
    44  
    45      $ docker volume create --driver fake --opt tardis=blue --opt timey=wimey
    46  
    47  These options are passed directly to the volume driver. Options for
    48  different volume drivers may do different things (or nothing at all).
    49  
    50  *Note*: The built-in `local` volume driver does not currently accept any options.