what is meant by option device? in Docker volume?
docker volume create \
--driver local \
--opt type=none \
--opt device="/home/userA/Containers/vol1/home" \
--opt o=bind \
$DOCKER_VOLUME_NAME
where is data physically stored in the above example
- /home/userA/Containers/vol1/home or ( BLOCK STORAGE DEVICE )
- /var/lib/docker/volumes/vol1/_data ( DOCKER LIB PATH )
- Both of the above.
If i know where it can be saved physical file, i will get better understanding
Ref:
As per the documentation:
You can mount a block storage device, such as an external drive or a drive partition, to a container.
But i do have a query
$ docker volume inspect vol1
[
{
"CreatedAt": "XXX",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/vol1/_data",
"Name": "vol1-home",
"Options": {
"device": "/home/userA/Containers/vol1/home",
"o": "bind",
"type": "none"
},
"Scope": "local"
}
]