I need help with to speed up on page request of my wordpress project running docker on Macbook Sonoma 14.7.1.
The current issue is that it takes 20 to 30 seconds just to load a web page or each request. I think there might be issues related to file I/O or file sharing. However, I have tried the following but still not help:
In my docker desktop, v4.35.0, I have selected Apple Virtualization Framework, Use Rosetta and VirtioFS.
In my docker-compose where I define volumes, I have used :delegated.
As I’m not using anything in Docker Desktop that reads a lot of files, I can’t tell you what is wrong, but what you are using ae actually bind mounts, not volumes. Just to test if the problem is the file sharing, you can try using actual volumes which are inside the virtual machine of Docker Desktop. For that you would need to replace the bind mounts with volumes
and copy the the data into the container using docker cp.
If the file sharing turns out to be slow, you have the following options (which you could try first if you want to):
Use the new Docker VMM beta feature which makes Docker Desktop faster but adds some limitations at the moment
Thanks @rimelek for your suggestions. But first, I’m not sure how to use Docker Desktop volume for my case. Would you kindly provide some sample code snippet? I know you may not know exactly on my project setup, but based on my given volumes yml above, I guess you would be able to write some sample . Secondly, I have tried VMM beta, but not help. Last, unfortunately, I’m on free plan which no access to Synchronized Fileshares feature yet. However, I’ll try with the Sync Fileshare as the last choice after trying all the rest.