←back to thread

302 points Bogdanp | 3 comments | | HN request time: 0s | source
Show context
ahartmetz ◴[] No.44390744[source]
That person seems to be confused. Installing a single, statically linked binary is clearly simpler than managing a container?!
replies(3): >>44390794 #>>44390802 #>>44391204 #
jerf ◴[] No.44390802[source]
Also strikes me as not fully understanding what exactly docker is doing. In reference to building everything in a docker image:

"Unfortunately, this will rebuild everything from scratch whenever there's any change."

In this situation, with only one person as the builder, with no need for CI or CD or whatever, there's nothing wrong with building locally with all the local conveniences and just slurping the result into a docker container. Double-check any settings that may accidentally add paths if the paths have anything that would bother you. (In my case it would merely reveal that, yes, someone with my username built it and they have a "src" directory... you can tell how worried I am about both those tidbits by the fact I just posted them publicly.)

It's good for CI/CD in a professional setting to ensure that you can build a project from a hard drive, a magnetic needle, and a monkey trained to scratch a minimal kernel on to it, and boot strap from there, but personal projects don't need that.

replies(2): >>44392059 #>>44392854 #
scuff3d ◴[] No.44392059[source]
Thank you! I got a couple minutes in and was confused as hell. There is no reason to do the builds in the container.

Even at work, I have a few projects where we had to build a Java uber jar (all the dependencies bundled into one big far) and when we need it containerized we just copy the jar in.

I honestly don't see much reason to do builds in the container unless there is some limitation in my CICD pipeline where I don't have access to necessary build tools.

replies(1): >>44394801 #
mike_hearn ◴[] No.44394801[source]
It's pretty clear that this whole project was god-tier level procrastination so I wouldn't worry too much about the details. The original stated problem could have been solved with a 5-line shell script.
replies(1): >>44398504 #
1. scuff3d ◴[] No.44398504[source]
Not strictly related, but I got to the parts about using a dependency to speed up builds in the container, and that his website has "hundreds" of Rust dependencies, and I was reminded why I get so annoyed with Rust. It's a great language, but the practice of just duct taping a bunch of dependencies together drives me nuts.
replies(1): >>44400342 #
2. aaronblohowiak ◴[] No.44400342[source]
what language are you using where you arent pulling in deps for much of the work?
replies(1): >>44400796 #
3. scuff3d ◴[] No.44400796[source]
At work I prefer languages that take a "batteries included" approach. So Go and Python are good examples. You can get really far with just what is offered in the standard libraries. Though obviously you can still pull in a shitload of dependencies if you want.

In my own time I usually write C or Zig.