github.com/ojongerius/docker@v1.11.2/man/docker-volume-create.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JULY 2015 4 # NAME 5 docker-volume-create - Create a new volume 6 7 # SYNOPSIS 8 **docker volume create** 9 [**-d**|**--driver**[=*DRIVER*]] 10 [**--help**] 11 [**--label**[=*[]*]] 12 [**--name**[=*NAME*]] 13 [**-o**|**--opt**[=*[]*]] 14 15 # DESCRIPTION 16 17 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: 18 19 $ docker volume create --name hello 20 hello 21 $ docker run -d -v hello:/world busybox ls /world 22 23 The mount is created inside the container's `/src` directory. Docker doesn't not support relative paths for mount points inside the container. 24 25 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. 26 27 ## Driver specific options 28 29 Some volume drivers may take options to customize the volume creation. Use the `-o` or `--opt` flags to pass driver options: 30 31 $ docker volume create --driver fake --opt tardis=blue --opt timey=wimey 32 33 These options are passed directly to the volume driver. Options for 34 different volume drivers may do different things (or nothing at all). 35 36 The built-in `local` driver on Windows does not support any options. 37 38 The built-in `local` driver on Linux accepts options similar to the linux `mount` 39 command: 40 41 $ docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 42 43 Another example: 44 45 $ docker volume create --driver local --opt type=btrfs --opt device=/dev/sda2 46 47 48 # OPTIONS 49 **-d**, **--driver**="*local*" 50 Specify volume driver name 51 52 **--help** 53 Print usage statement 54 55 **--label**=*label* 56 Set metadata for a volume 57 58 **--name**="" 59 Specify volume name 60 61 **-o**, **--opt**=[] 62 Set driver specific options 63 64 # HISTORY 65 July 2015, created by Brian Goff <cpuguy83@gmail.com>