Docker Community Forums

Share and learn in the Docker community.

How to get reliable, compatible mounts working with docker for windows or lcow? (win<->linux)


(Andy2222) #1

Hi,

a lot of containers i like to use store data using sqlite + wal, which does not work on shared volumes and also does not work on volumes via lcow. Than there is the other problem that filesystem notifications don’t work or do not work reliably on mounted shares. The main reason seems to-be that neither docker for windows or VBox offer a solid/compatible mounting option, both seem to use some sort of cifs under the hood. No idea how lcow works internally compared to docker/vbox shares.

So the only solution seems to-be to either mount a filesystem with “working” cifs/nfs/sshfs parameters from inside the container or use a “reverse” share. The reverse share just means to offline a filesystem and attach it directly to the linux host VM, than use a samba/nfs container to make shares available to windows.

So lets look at the problems:

  1. Ideally we want to use a filesystem linux/windows can use, so by simply onlineing/offlineing the filesystem we can attach it to the VM or windows. The most compatible is fat32, but we run into the max. filesize problem. The better alternative would be exFAT, but we need to somehow add the dkms/kernel driver to moby or any other minimal docker host system.

  2. Ideally we want to directly mount the filesystem/disk to the VM host, for best speed and compatibility. Yet on docker for windows we have no easy shell access.

  3. If we use a reverse share via samba, we run into port problems on the windows side.

So does anyone have tips on how to solve this puzzle? If i want a ideal setup, i would need to use a VM with a minimal docker optimized distro, where i still can easily add/compile the exFat (no-fuse) driver and also permanently mount the offlined disk properly inside the VM. Now it seems i could still use docker for windows client and a environment export for docker-machine to avoid needing to ssh into the VM? So i can still directly work with docker inside powershell?

Maybe anyone has tips or a guide to get this working, without going too crazy or a simpler alternative? From a technical and ease of use standpoint, LCOW looks wonderfully, yet i have very little hope that the filesystem problems that plague VBOX/docker for windows (moby) will be solved “soon” via lcow? I suspect lcow is not based on cifs, but not sure.

thx
Andy

PS: Btw how does vmware shares work internally? Is it also some sort of cifs implementation?