github.com/rsampaio/docker@v0.7.2-0.20150827203920-fdc73cc3fc31/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 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  ## Driver specific options
    33  
    34  Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options:
    35  
    36    $ docker volume create --driver fake --opt tardis=blue --opt timey=wimey
    37  
    38  These options are passed directly to the volume driver. Options for
    39  different volume drivers may do different things (or nothing at all).
    40  
    41  *Note*: The built-in `local` volume driver does not currently accept any options.
    42