Hacker News new | ask | show | jobs
by sunshowers 506 days ago
Unnecessary complexity makes debugging and understanding the system much harder.

This is particularly common with CLI tools written in some languages. I was looking at Antora the other day (not intending to single this project out, it's just the one that came to mind). I found two ways to run it:

1. By installing Node: https://docs.antora.org/antora/latest/install-and-run-quicks...

2. By running it in a Docker container: https://docs.antora.org/antora/latest/antora-container/.

The amount of complexity here is shocking. This is a tool that could just as well be a single binary, with the only dynamic linkage being to libc and maybe OpenSSL.

This also means that if something goes wrong, black-box debugging tools like system call tracers are much harder to use. I rely on system call tracers all the time, and it really sucks when they stop working.

1 comments

It's just "complexity" if you aren't super comfortable with docker.. it's super easy to do everything you describe with docker. Like for me it's much easier to debug in a self contained system, because even a binary can have issues with dynamic linking, etc. So for me the complexity is reversed. I don't want to pollute my actual machine with stuff when a docker container is just as easy to use. I don't want my distro's OpenSSL to be slightly incompatible with something that the package is using. A dockerfile removes all of that.
Well, distributing CLI tools as Docker images came about in part due to environments like Node, which made it harder to ship a single statically linked binary.

Imagine, like, your source control tool being shipped as a Docker container.

I agree yes, CLI tools should not come in docker packages. I'd also blame python for that, it's harder to package.

Don't get me wrong, I absolutely would love for everything to just be statically linked and packaged in a single binary (an approach that works great on windows usually). And you are right that "over using" docker is kind of a trend, but I think it's due to a problem (packaging apps in Linux) rather than being a problem by itself.