Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why is image size important? Should we instead optimise for speed of build?

If storage is cheap. And CPU costs Co2 does it make sense to spend longer time and more energy to save disk space?



It's not just the raw size of the image, but also about what the image includes; a smaller image often reduces the potential attack surface because vulnerable things just aren't there.

That's one of the major rationales behind the distroless images. Being space optimized is just a really nice side effect.


>> a smaller image often reduces the potential attack surface because vulnerable things just aren't there

By the way, the article proposes blind download of artifacts from someplace on the internet, on every build. Not only that can cripple your builds when the source is down (which happens all the time), it can (and that has happened) send you arbitrary infected crap instead of what you wanted.


>Why is image size important?

Cold start times I'd imagine


There are plenty of resource limited use cases, where storage is not exactly cheap. Or updating image over network might be slow or expensive (think edge, over 3-4g)


How many servers are you copying the image to?


security (e.g. attack surface)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: