Skip to content

Size

The base image decision, honestly

Where most of your image comes from, what `-alpine` and `-slim` actually buy, and why the smallest base is not always the right one.

Where the bytes are

For most applications the base image is the majority of the final image, and the application is a rounding error on top of it. A Node application might be four megabytes of your code sitting on a gigabyte of distribution.

That makes the base the single highest-leverage line in the file, and also the one people change last, because changing it is the one that might actually break something.

Build these two and compare the totals. Nothing else about them differs.

Predict first

Your application code and its dependencies come to about 240 MB. You move from `node:24` to `node:24-alpine`. Roughly what happens to the image?

Dockerfile

  1. 1
  2. 2
  3. 3
  4. 4

Layers

Nothing has been built yet. Press Build and the layers, the digest and the cache ledger appear — not before.

Everything you do here stays in this browser.Part of liter8.sh