Hacker News new | ask | show | jobs
by ilkkal 1951 days ago
I’m sure it’s usually just a case of “thinking while typing”, but I find it surprising how often articles about Docker stuff get some basic details a bit wrong. In the very first code example there is a RUN instruction where the author probably meant to have a CMD instruction, and they talk about BuildKit and build cache optimisation even though that was always something to think about, way before BuildKit was a thing.

I’m not trying to say I know everything or that the article is wrong or bad, but it’s an observation I’ve made.

3 comments

I think this is exactly why people should use Buildpacks over Dockerfiles. I've seen so many Dockerfiles that are wrong, or even introduce security problems.
Might have been an intentional mistake ? It fits the arguments pro build-packs.
The RUN? I thought about that but I don’t see how that would work. Or is the argument that Dockerfiles are just too hard?

(An argument I’m not unsympathetic to)

Yeah, argument is they might be prone to errors.
Hi @ilkkal. Thank you for the note - I've corrected the directive!