3 ms·
All services you describe can simply be installed on the pi without docker with a single apt/yum/pkg command line. No need for docker there.
by mvanbaak 5y ago
All services you describe can simply be installed on the pi without docker with a single apt/yum/pkg command line. No need for docker there.
- rixrax 5y agoTrue. But I do like the fact that this way I have [almost] stock Raspbian OS and all the crud that gets installed by pihole, minidlnad, cloudflared, shinobi (especially by this!!) and so on are one 'docker image rm' away from removal. And then there is of course the pure hack value of playing with the setup I don't get to/have to deal with / manage otherwise.
- selfhoster11 5y agoCrud containing for easy removal was one reason why I chose Docker for my infrastructure too. I'm fearless about trying out new containers, because the worst that can happen still leaves everything outside of that one application intact.
- handrous 5y ago- Docker's built-in service management works plenty well enough for a lazy home setup, which saves you having to care about how your server's distro manages services. - Using docker means I can easily specify the version I want to run. - Docker images are, for some reason, often simpler to configure than OS packages, for the same result. - It's also really easy to tell what you need to back up, and to be sure that you got all of it. Plus it's very easy to make sure everything—data and config—for every service lives in a single branch of the filesystem tree, for further convenience. - For similar reasons, entirely erasing a daemon is very easy. - Using docker means I don't have to care which version(s) of the software I need is provided by my distro, or go track down extra repos, or whatever. This makes it easy to run a boring-but-stable distro to minimize maintenance, but still have the latest versions of the things you're actually running, and upgrading one of them will never mess up anything else. - There's a lot more server software available through docker-hub than most (all?) distro official package sets—and, again, that works the same no matter which distro you're on, so everything about it, including the knowledge, is portable. - All that, using the exact same docker-compose files or simple shell scripts, works the same on any distro, plus macOS. Migrating to a new server can, trivially, be made as simple as rsyncing your entire docker-stuff tree and then doing one "docker-compose up -d" or running a single very boring and simple shell script one time. Really, the only down-side is you can't use it on FreeBSD right now. As someone who's run Linux servers (public-facing, even, in the early days) at home since, oh, 2000 or 2001 (plus managing them professionally) I can say that Docker's great for home servers. Less fiddly trivia to worry about. What distro's on my home server? I'm not even sure. I think it's Debian? Dunno. Hardly matters. I've written zero "config as code" stuff for my home set-up, yet could have a new server up with identical services in maybe 3-5 minutes longer than it takes to install the OS, and all but maybe a minute of that would be hands-off, just watching progress bars complete. With effort I could get that down even lower, but I got that much for free.
- selfhoster11 5y agoI agree exactly with what you said, since this is exactly my experience as a home hoster. To add to what you said, I suspect that Docker containers are much easier to configure than OS packages because they are all to some extent Twelve Factor compliant, which means that configuration and operations are simplified.
- handrous 5y ago> To add to what you said, I suspect that Docker containers are much easier to configure than OS packages because they are all to some extent Twelve Factor compliant, which means that configuration and operations are simplified. Yeah, I think that's got something to do with it. At the very least, you practically have to document right up front where all the config affecting the container lives, both files and env vars. It's also tempting to put the most commonly-used config items in env vars, if they weren't already. Consequently, dockerized Samba, for example, is the easiest config of that daemon that I've ever performed, for any of my never-unusual-or-complex use cases, including with GUI tools, over a couple decades of using it.
- selfhoster11 5y agoOnce you know it, Docker is so much easier operationally. The following things are easy: - Tweaking a container version in the composefile to upgrade or downgrade - Entirely swapping out the underlying Linux distro without touching a line of code in existing composefiles - Isolating all incidental data generated by the application from the user-generated data (for backup purposes) - Infrastructure as code (so you can easily migrate between servers, and version your setup) - Quick iteration on service set-up are all so much easier with containers. It's possible to remove services entirely too, so experimentation between different options is very easy. A sustainable self-hosted setup is one that is quick to maintain and upgrade. If you don't do both, security issues and incompatibilities will eventually be a problem.