I just posted this idea into another thread that was discussing the current slow nature of mounting shared Mac folders into containers running in the Moby VM.
Anyway, here is my feature request:
Support creating/mounting/unmounting/deleting additional virtual disks in the Preference Panel in the Moby Menu. These virtual disks would correspond to single .qcow2 files on the Mac side and the Preference Panel would allow specifying the path on the Mac side for the file. The Panel would also allow specifying the mount point path within the Moby VM so I could easily create a separate virtual disk and mount it to /data or some other path I want.
These virtual disk files on the Mac side would only hold my apps persistent data and would survive a “reset to factory defaults”. I’d still have to go to the Preference Panel after reset to mount it to the same place in the VM, before building/rerunning my app in Docker for Mac. Also, these virtual disks should be able to be backed up by Time Machine since, in my case, they would hold less than a few GBs of data (the current Moby VM .qcow2 file holds a lot more data and tends to grow over time so I don’t back it up right now).
There could also be a checkbox to place volumes created by “docker volume” command on one of these virtual disks so they too survive a “reset to factory defaults”.
I/O should be fast to these virtual disks unlike I/O to the fuse osxfs file system that maps the /Users folder on the Mac to the /Users directory in the Moby VM.
If possible, I would like for the Moby VM to support exporting these mount points (virtual disks) to NFS and use the NFS client on the Mac side to make these filesystems accessible in my home folder on the Mac. Then I could use Mac side tools to edit/change files and have these changes immediately appear inside a running container in the VM.
Not sure how complex setting up a network between the Moby VM and the Mac host for NFS, but I think it would be doable.
So, I’m suggesting this feature as an alternative to hosting my persistent data on the Mac and using osxfs to access this data seemlessly inside the VM. This works great, except that access to the data files are super fast on the Mac, but super slow from within running containers. With this feature, access within running containers would be super fast at the cost of being super slow on the Mac side.
This is a choice I’d like to be able to make in my development environment. Maybe even to mix the two alternatives so some data would primarily exist in my Mac home folder and other persistent data might be placed primarily in the Moby VM.
Both alternatives would be easy to backup and would survive reinstalls/upgrades to Docker for Mac.