I love Docker, but I gave up on using it on Mac. I put a lot of effort into fighting it, but ultimately, it seems some of the issues are just too fundamental. I like to call the Docker-for-Mac experience the MacBook Airplane. At some point, your fans will start spinning, your productivity will crash, and you'll spend the next three hours sifting through open GitHub issues from 2017 where everyone is still complaining about the same problems.
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.
At work we used Docker for local development but not production, purely because we have some ageing internal systems and it made it easier to deal with different versions of PHP, MySQL, etc.
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.
We did this at my previous job. We tried with docker-sync and that was already a good improvement (~5x faster web app load speed). But the real improvement was moving to running the app natively, another 10x improvement. I’m talking about ~5s load times (default docker setup) to <100ms.
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.
Totally agree. Docker for Mac performance is just unbearable when dealing with a semi-large webapp. I recently moved to remote development – macOS with Ubuntu running in VM (VMware) via Vagrant. I edit code using VSCode & Vim (via SSH & tmux tabs in iTerm2).
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).
I did the same after constantly yelling at docker. It’s amazing what vscode has been able to pull off to make ssh feel local. I’ve tried other solutions before and they’ve all had noticeable lag. The only time I notice is if I’m remote and on a cell connection or airplane.
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.
Terminal windows get messed up. Oddly sometimes they resume, but most times they don't. Example docker-compose will still run in the background but if Im coming back over a weekend I might not remember and running a different project will error since another docker is using the ports.
I know not a big issue and I could use tmux, but I'm lazy.
Tmux solves this problem for me. I don't use the VSC integrated terminal at all. I have its scrollback buffer set to 1.
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.
M1 MBP here, and my lap is freezing. I have no idea what the fans sound like, and I do lots of Go benchmarks using all cores pretty often (I know, it's probably not that strenous--but for a tmux+vim+Go dev this thing is impressive).
Does anyone know if there’s a parallel workflow in PyCharm? That is, running on a remote docker container. I haven’t yet been able to get this working but it’d be a vastly superior workflow for my use cases in ML/DS.
There are basically two parts you need to solve. You need files that you edit to save on the remote, and you need to be able to run commands on the remote. So a barebones setup might be SSHFS for mounting files locally, and editing them locally while running commands in an SSH session in your terminal.
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.
You're joking right? At my previous job we had dozens of devs who worked with Windows WSL2 + Docker just fine.
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.