Creating Docker Volumes

the volume create command of the docker

docker volume create testVolume

This command creates a data volume name testVolume that can be used by a specific container or shared among a cluster of containers.

docker volume inspect testVolume

The resultant data shows that our testVolume is mounted at the location /var/lib/docker/volumes/testVolume/_data of our host machine.

sudo ls -al /var/lib/docker/volumes/redis-data/_data

-rw-r--r-- 1 systemd-coredump username 92 Jun  1 18:57 dump.rdb