brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

Ignore shared folders #198

Open genezys opened 7 years ago

genezys commented 7 years ago

I do have some shared folders inside my VM that I use. It would be cool to be able to tell docker-osx-dev to ignore those shared folders using a parameter or an environment variable.

The whole story is that I mount readonly backups from production on my OS X machine to be able to have production data without consuming storage. I then share this folder with my Docker VM where I build an AUFS mount to allow the VM to write to the readonly backup. I am then able to quickly discard any modifications and restart from scratch. That is a great way to work with production files!

I currently directly modified the docker-osx-dev code to grep -v my shared folders in find_vboxsf_mounted_folders but this is not a great solution.

I would like to be able to configure a list of folders that are excluded from find_vboxsf_mounted_folders, preferably not at each run but globally.

brikis98 commented 7 years ago

Ah, interesting. If this is a common occurrence, it would make sense to add some sort of --keep-vbox-shared-folder param (which could be specified multiple times) that will be skipped over by the check_for_shared_folders function. Does anyone else out there have a similar use case?