logoalt Hacker News

hu3last Thursday at 8:24 PM3 repliesview on HN

That is what they are doing. It's a 2 stage Dockerfile.

First stage compiles the code. This is good for isolation and reproducibility.

Second stage is a lightweight container to run the compiled binary.

Why is the author being attacked (by multiple comments) for not making things simpler when that was not claimed that as the goal. They are modernizing it.

Containers are good practice for CI/CD anyway.


Replies

AndrewDuckerlast Thursday at 8:46 PM

I'm not sure why "complicate things unnecessarily" is considered more modern.

Don't do what you don't need to do.

show 1 reply
MobiusHorizonslast Thursday at 8:44 PM

That’s a reasonable deployment strategy, but a pretty terrible local development strategy

show 1 reply
adastra22last Friday at 12:25 AM

Because he spends a good deal of the intro complaining that this makes his dev practice slow. So don’t do it! It has nothing to do with docker but rather the fact he is wiping the cache on every triggered build.