top | item 45790829

(no title)

gkfasdfasdf | 4 months ago

> image-manip squash: This is the key to reclaiming disk space and the core of our strategy to squash the image layers. The tool creates a temporary container, applies all 272 layers in sequence to an empty root filesystem, and then exports the final, merged filesystem as a single new layer. This flattens the image's bloated history into a lean, optimized final state.

Wouldn't a multistage Dockerfile have accomplished the same thing? smth like

FROM bigimage

RUN rm bigfile

FROM scratch

COPY --from=0 / /

discuss

order

mystifyingpoi|3 months ago

I think yep, pretty much. Maybe they didn't know this existed?

pjmlp|3 months ago

Given that I was using multi-layers in 2020, when I finally got involved in projects with Docker, five years is already some time to learn about this stuff, and I bet is is much older, not bothering to look it up.