Closed odeialba closed 1 year ago
This is working very well for me, can we get that integrated?
Hi @odeialba ,
nice improvement, if it really helps the mac experience.
I've not been able to review it with detail... but wanted to share something that, IMO, is a requirement for new code like this to land.
And it's that we must guarantee backwards compatibility 100%, making new stuff completely optional.
So, if I'm using here moodle-docker via scripts (or in some CI/pipeline) it MUST continue working without modifications (or will break badly everywhere). And I'm not sure that this PR supports that (it seems that the new nfs stuff is called unconditionally).
I'd suggest some optional env var, well documented in order to "activate and use" the nfs thing. Guaranteeing that, if that option isn't enabled... old behaviour is 100% the same.
Surely the bash script can be set with execution perms in git (like the rest of shell scripts are) and we don't need to perform the manual chmod.
Also... it must be clear if that script needs to be executed only once or always and, maybe, there should be a way to move aways from nfs (back to normal) too.
Ciao :-)
The current Mac performance solution is to enable both the experimental settings (virtualisation and VirtioFS) in the preferences of Docker Desktop.
See https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/
I find the performance on M2 mac satisfactory if "new virtualisation framework" and "VirtioFS" enabled from experimental settings.
Thanks @mouneyrac and @skodak , I also think this issue can be closed.
Thanks all!
Docker is very slow for mac users (mainly when installing the db from scratch or setting up behat and phpunit and running them). To fix that, we are able to use NFS. This PR uses NFS for Mac users instead of the old
:cached
.Source: https://vivait.co.uk/labs/docker-for-mac-performance-using-nfs