docker volume create

volume create

Usage:  docker volume create [OPTIONS]

Create a volume

Options:
  -d, --driver string   Specify volume driver name (default "local")
      --help            Print usage
      --label value     Set metadata for a volume (default [])
      --name string     Specify volume name
  -o, --opt value       Set driver specific options (default map[])

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:

$ docker volume create --name hello
hello

$ docker run -d -v hello:/world busybox ls /world

The mount is created inside the container’s /world directory. Docker does not support relative paths for mount points inside the container.

Multiple containers can use the same volume in the same time period. This is useful if two containers need access to sha