How to store a volume on an other host mount point (/dev/vda)?

Hi everyone!

I plan on using docker for deploying a nextcloud instance (same as owncloud)
So I just bought a Ubuntu Xenial vps from a cloud provider and a external volume of 50gb.

This volume is mounted on /dev/vda/ the goal would be to store all the data on this mount point.
I cant use the default docker path as the vps host just have enough storage to install a few package and files.

My issue is that dont find any official documentation on my use case.
How can I precise in the volume command that I want to use a specific path ?

Hi. I think the easier way is mount the device in the host on /nextcloud or whatever you want, and bind this mountpoint (not the device itself) to the container.

Also you can use the --device flag if you want to use the device directly in the container

docker run --device=/dev/vda …

I never use it, but i have read you can also limit the iops or bytes/sec the container can use in a raw device.

search “–device” here: