Ah, this exposes my ignorance re: Docker. My old with was clearly doing something like this, in that we were running rails and no locally. Thanks for the explanation!
Distrobox is what the cool kids with immutable operating systems use at it integrates very nicely with your host environment.
It’s available on all the major Linux distributions and allows you to run any Linux distro enviornment of your choice as a container and install all the tools you need as a canned image. This makes it awesome for development environments as you basically open a new terminal that boots into your environment in a few milliseconds.
I always use rootless podman for container work and steer well clear of docker.
This explains how to get cracking with controlled development environments:
Unfortunately I’m not cool and have a Mac I’ve been meaning to look into podman, though. For my current client’s super simple app I’ve been using systemd which I’ve found to be a really nice experience.
I think nowadays you can buy a VM, install linux on it and use it as your development machine, things like vscode have integration out of the box for this.
The CEO at my previous company did this, as his main devices he used was an ipad and a windows machine.
Fortunately…
D’oh. I knew about podman but thanks to the very quick skimming I did, distrobox looked to be linux-only. Thanks!
I think I prefer this solution. I defined my env variables in a .env file somewhat like so
export VAR1=VAL1
and whenever I want to start my server, I run this command:
source .env && mix phx.server