by KronisLV | 2025-06-08 12:20:56+00:00
> Docker has made self-hosting so much easier and painless.

Mostly agreed, I actually run most of my software on Docker nowadays, both at work and privately, in my homelab.

In my experience, the main advantages are:

- limited impact on host systems: uninstalling things doesn't leave behind trash, limited stability risks to host OS when running containers, plus you can run a separate MariaDB/MySQL/PostgreSQL/etc. instance for each of your software package, which can be updated or changed independently when you want - obvious configuration around persistent storage: I can specify which folders I care about backing up and where the data that the program operates on is stored, vs all of the runtime stuff it actually needs to work (which is also separate for each instance of the program, instead of shared dependencies where some versions might break other packages) - internal DNS which makes networking simpler: I can refer to containers by name and route traffic to them, running my own web server in front of everything as an ingress (IMO simpler than the Kubernetes ingress)... or just expose a port directly if I want to do that instead, or maybe expose it on a particular IP address such as only 127.0.0.1, which in combination with port forwarding can be really nice to have - clear resource limits: I can prevent a single software package from acting up and bringing the whole server to a standstill, for example, by allowing it to only spike up to 3/4 CPU cores under load, so some heavyweight Java or Ruby software starting up doesn't mean everything else on the server freezing for the duration of that, same for RAM which JVM based software also loves to waste and where -Xmx isn't even a hard limit and lies to you somewhat - clear configuration (mostly): environment variables work exceedingly well, especially when everything can be contained within a YAML file, or maybe some .env files or secrets mechanism if you're feeling fancy, but it's really nice to see that 12 Factor principles are living on, instead of me always needing to mess around with separate bind mounted configuration files

There's also things like restart policies, with the likes of Docker Swarm you also get scheduling rules (and just clustering in general), there's nice UI solutions like Portainer, healthchecks, custom user/group settings, custom entrypoints and the whole idea of a Dockerfile saying exactly how to build an app and on the top of what it needs to run is wonderful.

At the same time, things do sometimes break in very annoying ways, mostly due to how software out there is packaged:

https://blog.kronis.dev/blog/it-works-on-my-docker

https://blog.kronis.dev/blog/gitea-isnt-immune-to-issues-eit...

https://blog.kronis.dev/blog/docker-error-messages-are-prett...

https://blog.kronis.dev/blog/debian-updates-are-broken

https://blog.kronis.dev/blog/containers-are-broken

https://blog.kronis.dev/blog/software-updates-as-clean-wipes

https://blog.kronis.dev/blog/nginx-configuration-is-broken

(in practice, the amount of posts/rants wouldn't change much if I didn't use containers, because I've had similar amounts of issues with things that run in VMs or on bare metal; I think that most software out there is tricky to get working well, not to say that it straight up sucks)