Docker is not without complications, but it alleviates far more problems than it causes. I get annoyed when something is released and doesn't have an official Dockerized version. Especially when it's a web service.
I'm a Python/Ruby/Javascript developer, and I don't want any part of those installed except on my dev machine. Unfortunately Python has infested too much of Ubuntu to avoid.
What's really nice is using direnv to cd into a directory and having a flake.nix file in it which changes the entire system to what I need to do in that folder. So I don't need any of my dev environment to be system-wide, everything is per project. That alone has cut my system down to pretty much just system tools (replacements for shell commands), productivity tools (Obsidian, bitwarden, etc), and my browser. It's just so nice.
How cross-platform is direnv + Nix? Do flake.nix files have macOS/Linux versions?
One of the biggest advantages of using Docker images as a package format is that it's (sort of) cross-platform via Docker desktop and such on a Mac. I would prefer to use something like Nix if possible if it solves the problem a different way (being aware of platforms).
Beats the tar out of the obnoxious curlpipe pattern anyway.
- People who use Docker (Compose) can easily get up and running with a project in minutes
- People who dislike/don’t use Docker can at least use the Dockerfile and Docker Compose file as a reference to learn how to install the dependencies and the service itself.
I kinda prefer docker installations because I don't need to guess what implicit "works on my machine" dependencies someone had, and the whole thing can be mostly stateless or the extra state is made pretty obvious.
For example, a study on this was recently conducted for PyPI. https://arxiv.org/abs/2309.11021
An updated Docker environment is pretty secure I think.