2 ms·
I don't understand why this isn't being done more. systemd has pretty much every convenience Docker has these days, without any of the ridiculous overhead and c
by jeroenhd 6y ago
I don't understand why this isn't being done more. systemd has pretty much every convenience Docker has these days, without any of the ridiculous overhead and cognitive load that comes with managing a Docker daemon.
Yes, you'd need to learn how to make a systemd unit file but honestly, that shouldn't be a problem at all. I've had much worse headaches fighting Docker's networks and firewall-overruling network configuration in the past. Every time I forget to specify a restart option, I have to dig through my shell history again to see how I launched the image so I can kill and recreate it, or I have to look up that oneliner that shows you the docker run command for a running container.
I run stuff in Docker for one simple reason: I have it installed and I'm too lazy to think about software sometimes. If you're packaging software, that laziness isn't a reason to pick a distribution tool.
Static binaries have other problems, perhaps most importantly package management. How do you distribute your app? Traditional deb/rpm packages? curl-to-bash installers? Snap? Flatpak? Binaries that people flog into /usr/bin? What about automated updates, do you set up a repository, do you include a self-updater in your code? The list goes on. Docker solves that by having one general source of packages with the option of adding a repo of your own (take note, Canonical, your shitty Snap Store is practically useless without that last bit).
For services I run on servers, I much prefer traditional packages with dynamically linked executables, for a simple reason: automatically fixing security issues and bugs across applications with a single update command, instead of having to wait for every maintainer of their statically-linked tool to update their dependencies.
It's one of the big problems I have with Rust; many dependencies and applications embed their own versions of dependencies with sometimes very specific versions, and when there will eventually be a massive security problem in one of the TLS packages I'm dependent on recompiles and code modifications from random open source maintainers.
- goodpoint 6y ago> I don't understand why this isn't being done more. I can only offer one explanation: marketing.
- dolmen 6y agoHere, we use docker-compose to automate container creation. And we have just one Makefile to automate docker-compose (to fetch credentials from secrets storage). Our images are made from Go binaries, so thanks to Go modules, we can manage dependencies centrally from the main module and rebuild.