5 ms·
I guess I'm one of those people mentioned on the rationle who keeps little servers ($5-10 Droplets) and runs a few apps on them. (Like a couple of Node/Go apps,
by adamddev1 5y ago
I guess I'm one of those people mentioned on the rationle who keeps little servers ($5-10 Droplets) and runs a few apps on them. (Like a couple of Node/Go apps, a CouchDB, a Verdaccio server). I also haven't had issues with things breaking as I do OS updates. Seems like it would be nice though just to have a collection of dockerfiles that could be used to deploy a new server automatically. My current "old fashioned" way has been very doable to me but my big question before jumping to some Docker-based setup is, does running everything on Docker take a huge hit on the performance/memory/capabilities of the machine? Like could I still comfortably run 4-5 apps on a $5 Droplet? Assuming I would have seperate containers for each app? I'm having trouble finding info about this.
- stavros 5y agoI haven't noticed any performance degradation (though granted, these are small apps), and my home server is 10 years old (and was slow even then).
- jrockway 5y ago"Docker containers" are Linux processes with maybe a filesystem, cpu/memory limits, and a special network; applied through cgroups. You can do all of those things without Docker, and there is really not much overhead. systemd has "slice units" that are implemented very similarly to Docker containers, and it's basically the default on every Linux system from the last few years. It's underdocumented but you can read a little about it here: https://opensource.com/article/20/10/cgroups https://opensource.com/article/20/10/cgroups
- adamddev1 5y agoCool stuff with the "slice units." I use systemd to keep apps running but didn't know all this. And yes I understand the basics of what Docker containers are. It just seems logical to me that it would be a lot more taxing on the system running that overhead. Like is it exponentially harder to fit the same amount of apps on a droplet if they're all containerized? Or is it still easy to run 4-5 modest containerized apps on a $5 droplet?
- franga2000 5y agoSlice units only help with resource allocation, but the main draw of Docker isn't that, but the fact that you can be running a completely different distro with a completely different stack since a container is basically a glorified chroot and that the image can be built from an easy to understand script and then shared with others. Sure, you could publish your app as a .tar.gz of the filesystem root and then users could extract it and have a script to bind mount everything and chroot into it. You could then set up a systemd service(s) for that script and set up a slice. But then you're just reinventing Docker from scratch for absolutely no reason. You could also use systemd-nspawn, but then you're losing out on a bunch of really useful features that the devs omitted because of philosophical reasons (as usual with systemd, they think they know better than you).
- jrockway 5y agoI'm not really telling people to not use Docker. I'm telling them how common cgroups are -- every Linux system is already using them.