The volume management command
Docker has introduced a top-level volume management command from version 1.9 in order to manage the persistent filesystem effectively. The volume management command is capable of managing data volumes that are part of the Docker host. In addition to that, it also helps us to extend the Docker persistent capability using pluggable volume drivers (Flocker, GlusterFS, and so on). You can find the list of supported plugins at https://docs.docker.com/engine/extend/legacy_plugins/.
The docker volume
command supports four subcommands as listed here:
create
: This creates a new volumeinspect
: This displays detailed information about one or more volumesls
: This lists the volumes in the Docker hostrm
: This removes a volume
Let's quickly explore the volume management command through a few examples. You can create a volume using the docker volume create
subcommand, as shown here:
$ sudo docker volume create 50957995c7304e7d398429585d36213bb87781c53550b72a6a27c755c7a99639
The...