My desktop is fresh install of Windows 11 (i9, 128GB RAM, SSDs), running Docker (v20.10.24) and Docker Desktop (v4.18) in WSL2 mode. I develop in Visual Studio Code (v1.77.3) and attach to the projects development folder.
In Docker, I have a Laravel project, with the project development files mapped to a local desktop location in my docker-compose:
volumes:
- ./:/var/www/html
This gave me 10 second page load times with just "Hello World" as the content, but still loading all my vendor files in the background I assume. So i changed to this in my Dockerfile:
COPY /project/ /var/www/html
And from there I got load times measure in milliseconds. But of course my project development files are 'trapped' within the docker image now.
I cant run PHP on my Desktop, I need to run it within Docker. Is there a general better workflow or development process that will give me performance and flexibility in development?
Note: I am running Apache, not artisan serve.