I'm new to Docker and I was playing around with docker volume
. I wanted to specify the location where docker volume
stores the data. Much like when we provide the -v
option when we execute docker run
. Ex : -v /somefolder/:/var/somefolder
How can we set a custom Mountpoint when we create a docker volume
. I didn't find any options on docs.
When I inspect the volume
[
{
"Name": "sampleproject_mysql_data",
"Driver": "local",
"Mountpoint": "/mnt/sda1/var/lib/docker/volumes/sampleproject_mysql_data/_data",
"Labels": null,
"Scope": "local"
}
]
I get something like above.