dev enviroment: windows wsl2 ubuntu docker vs vmware player 17 ubuntu docker

Just a quick post as maybe you are setting up a dev enviroment for Magento 2, it always takes some time. To save someone the trouble here is my quick experience in a nutshell: use vmware player 17 ubuntu docker if you don’t want lagginess in Windows 11 and memory leaks: https://github.com/microsoft/WSL/issues/8725

For more details I compared both setups. For both I use https://github.com/markshust/docker-magento Magento 2 docker stuff. Using Windows was nice as I like having everything there like I already had phpstorm, my clipboard manager, chrome, etc. But Windows just uses up all the ram quickly and becomes laggy. I debated about going the vmware route but just do it, it doesn’t take that long to setup. I benchmarked a simple page request after clearing caches in Magento 2 and the performance is actually a little better (8%) in vmware docker than windows wsl2.

Vmware supports multiple monitors, and I noticed even that phpstorm takes a ton less ram in ubuntu for some reason. Another quick win tip if you do this. Xdebug you can lose some time if you don’t know what to use. Basically it seems when using docker usually what works is ping host.docker.internal and use that in your php.ini for the host. Mine is like this:

xdebug.mode = debug xdebug.client_port = 9003 xdebug.client_host = 192.168.1.67 xdebug.discover_client_host = true xdebug.idekey = PHPSTORM max_input_time = 0 max_execution_time = 0 

If anybody has any tips or their own experience in this regard please do share.

submitted by /u/kjavitz
[link] [comments]