9 comments

[ 3.0 ms ] story [ 27.4 ms ] thread
Is docker eating up space?

Yes.

Endless GB of it.
I'm baffled people in 2022 still build on top of Dockerfiles and docker-compose, when nixpkgs (no need to opt-in the entire NixOS ecosystem) solves most issues Docker used to solve (by making 23 copies of Ubuntu bitrot on your SSDs), but also comes with garbage collection for free, and an elegant composition language.
> I'm baffled people in 2022 still build on top of Dockerfiles and docker-compose, when nixpkgs (no need to opt-in the entire NixOS ecosystem) solves most issues Docker used to solve ...

I'm always a bit taken aback whenever people mention Nix/NixOS as something popular, because I am yet to hear it be mentioned a single time in my country: Latvia.

None of the people in my (part of the) company that I work for seem to have heard of it or care about it and currently Docker itself is on the upswing, meeting some resistance along the way. Some want Kubernetes, others dislike maintaining it (or its resource requirements), others are caught up in the Docker vs Podman debate, from what I can tell some use Docker Compose successfully, others use Skaffold at the risk of making it more complicated to get new teammates up to speed, Nomad is basically unheard of anywhere. From what I can tell, some of the larger companies in the country are adopting Kubernetes and are moving more and more towards microservices (getting burnt plenty along the way and hopefully learning their limitations and when they actually make sense), but not a single mention of Nix/NixOS so far. I was pleasantly amused when in some company I heard someone mention LXC, but then again the person was opposed to any kind of automation at the risk of "forgetting how anything works", so that was a mixed experience.

I guess Latvia and many other countries that aren't trendsetters might be around 2-5 years behind others, maybe I'm just in the wrong circles of people, but I'd still pretty much call Nix bleeding edge: not because it's not a great solution for some of the problems it tries to solve, but rather because we're probably still not close to the peak of inflated expectations. Personally, I prefer to get into new technologies when there are ample tutorials for anything imaginable in a given technology, others have banged their heads against metaphorical walls and have solved all of the issues for me, so that by the time I pick the technology up, it's easy to get into.

That's also why I was kind of on the fence about Kubernetes (in certain environments, it's still not a good fit), but the experience has gotten way better in the past few years thanks to projects like K3s, Rancher and even k9s.

That said, this blogger had some pretty nice articles about Nix: https://xeiaso.net/blog (reading some of those articles still makes me err on the side of caution, though)

As for the actual article itself, it seems like Docker could use some better defaults and/or alerting about space usage. Personally I just automated the "prune" command with cron and haven't had serious issues with my personal homelab setup in years. As for Docker on the desktop, using the Hyper-V back end (on Windows, for example) and occasionally wiping the virtual disk it uses seems to be sufficient. Then again, even with a 240 GB SSD, I rarely needed to do that, although that probably depends on how verbose the logs are.

> I'm always a bit taken aback whenever people mention Nix/NixOS

I've never heard of it outside of drive-by comments on HN.

Docker is lot nicer with small distros, like Alpine. The images are incredibly tiny, with minimal dependencies.
I run my systems lean and small, by choice. When I decided to try to lick Docker, just to know what's what, I was imminently shocked by the space it can gobble up. I finally got a hang of it (after adding 1TiB disposable disk) but I'm still not a fan.
I thought the whole point of docker was to allow you to be lazy at the cost of lots of resources.