Re:Things I Wish I'd Known Before Using Vagrant
by lewisl9029 on Friday October 27, 2017 @12:09PM
(#15569737)
Regarding 1), Docker implemented a cached volume mount option to mitigate the performance issues on MacOS [1], but last time I tried it, file system events stopped working. I'm not sure if this is an inherent limitation or if it's something specific to my environment. I'd appreciate if someone more knowledgeable could clarify.
As for Windows, it doesn't have the same fs performance issues on volume mounts, but AFAIK file system events have never worked there [2].
My current reluctant compromise to make volume mounts work seamlessly across platforms is to use polling instead of relying on file system events. That way I can turn on caching on Docker for Mac, and everything just works. The downside is of course polling is inefficient, but I've found when you take care to exclude all non-source directories from the polling, it's usually not as bad as you'd think.
As for Windows, it doesn't have the same fs performance issues on volume mounts, but AFAIK file system events have never worked there [2].
My current reluctant compromise to make volume mounts work seamlessly across platforms is to use polling instead of relying on file system events. That way I can turn on caching on Docker for Mac, and everything just works. The downside is of course polling is inefficient, but I've found when you take care to exclude all non-source directories from the polling, it's usually not as bad as you'd think.
[1] https://docs.docker.com/docker-for-mac/osxfs-caching/#tuning...
[2] https://github.com/docker/for-win/issues/56#issuecomment-242...