I may just be failing to searching these forums, as I feel like this is something that would have been asked and answered, but how can I mount folders outside the User directory on Docker Toolbox on WIndows 10 Home? I’ve shared the folder onto the VM, but can’t seem to actually get it to mount into a container (using docker compose). I’ve tried looking online but everything seems to be 2+ years ago and out of date.
Can I do this? It’s really frustrating that it looks like I’d have to do work in one folder and then move it to another to actually put into my containers.
For Windows 10, it is probably better to use Docker for Windows for better integration and more native experience.
On the other hand, for anybody stuck with Docker Toolbox (using iOS or older Windows), one must either:
Create VM with docker-machine --virtualbox-share-folder option, or
Change VM shared folder with Virtualbox UI or VBoxManager
Default Docker Toolbox enables shared folder C:\Users → /c/Users, giving users a false sense of capability of accessing any folder on native machine, while it’s actually, well, just a normal Virtualbox shared folder. It’s completely incapable of accessing anywhere beyond C:\Users under default setting.
Therefore, to access other locations, say D:\Myproject\prj1, the procedure would be:
1 Create virtualbox shared folder D:\Myproject → /foo (any mount point is fine)