After numerous Docker woes on Mac I ended up just spending a tiny bit of time installing and configuring Nginx and various PHP-FPM and MySQL versions from MacPorts. It was easy, I learned a lot more about the platforms we use, and because they're all socket-based they can all be running at once. Just added a couple of bash functions to bring everything up and down.
Sure my dev environment isn't the same as prod, but it wasn't when I was using Docker either.
I like the simplicity of setting up a docker project vs. having to figure all the bits and config for your machine. But the slow fs is unbearable.
Based on my benchmarks it's more than twice as fast as Docker for Mac – and only minimally slower than native Docker running on a Dell XPS.
I'm enjoying this setup so much that I'm considering moving all my dev-related tools to a VM (which will hopefully allow me to get rid of homebrew too).
The one thing I wish they’d improve was re-establishing a connection after the computer sleeps. Really annoying to have to reload the entire window, sometimes.
I know not a big issue and I could use tmux, but I'm lazy.
The reload isn't bad for me -- it even keeps my text editors open with undo history. I'm not sure if I had to do something to enable that. There is probably a way to make it retain the integrated terminal, too (though you should really use tmux, it's awesome).
I’m guessing that doesn’t work for remote terminals though, I haven’t tried it.
Seconding what the other guy said though, tmux is perfect for this. If you use the iTerm2 tmux integration you don’t need to remember all the commands to switch tabs, scroll back, etc, it just feels local just like VSCode.
This problem has been solved with the M1 MacBook Air.
It's so much better than Docker for Mac.
Though honestly... you should really try VSCode. You'll get a lot more than simple editing and remote commands (e.g. integrated debugging, etc). VSCode actually installs and runs a headless instance of itself on the remote, and decouples the UI from extensions, language servers, etc. It's a lot more than just editing remote files.
Try downloading it, creating a $5/month VM, and setting it up as a Remote SSH machine. I know it feels like a cult but it's far and away the best editor experience I've had. I switched from Sublime and was up to speed in a day because I could import all my keybindings. You can probably do the same coming from PyCharm.
From what I remember the only requirement was that the dev environment stayed inside WSL2. Performance was native-like. With VSCode remote extensions it just works.
I still prefer Linux as a general development platform.
I'm all in on VSCode Remote SSH development now. It works extremely well, I barely even notice I'm not programming on my own computer, and my laptop no longer sounds like a passenger jet taking off. It was very easy to setup. Our stack is still very Docker heavy, but using the containers on a remote machine makes it much more tolerable to work with.