github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/cli/man/src/volume/create.md (about)

     1  Creates a new volume that containers can consume and store data in. If a name
     2  is not specified, Docker generates a random name. You create a volume and then
     3  configure the container to use it, for example:
     4  
     5      $ docker volume create hello
     6      hello
     7      $ docker run -d -v hello:/world busybox ls /world
     8  
     9  The mount is created inside the container's `/src` directory. Docker does
    10  not support relative paths for mount points inside the container.
    11  
    12  Multiple containers can use the same volume in the same time period. This is
    13  useful if two containers need access to shared data. For example, if one
    14  container writes and the other reads the data.
    15  
    16  ## Driver specific options
    17  
    18  Some volume drivers may take options to customize the volume creation. Use the
    19  `-o` or `--opt` flags to pass driver options:
    20  
    21      $ docker volume create --driver fake --opt tardis=blue --opt timey=wimey
    22  
    23  These options are passed directly to the volume driver. Options for different
    24  volume drivers may do different things (or nothing at all).
    25  
    26  The built-in `local` driver on Windows does not support any options.
    27  
    28  The built-in `local` driver on Linux accepts options similar to the linux
    29  `mount` command:
    30  
    31      $ docker volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000
    32  
    33  Another example:
    34  
    35      $ docker volume create --driver local --opt type=btrfs --opt device=/dev/sda2