Samprix

Docker Image Size Calculator

Paste or open a Dockerfile to see roughly how big the image will be, which steps make it big, and what to change. Nothing is built.

Your files stay with you Tips last checked: how

Looking up base image and package sizes…

Reading the registry and package lists.

Estimated size … Looking up sizes…
Base image — download size
Packages — installed size
  1. FROM node:22 …
  2. RUN apt-get update
  3. RUN apt-get install -y ffmpeg
  4. COPY . .
  5. RUN npm install
  6. RUN npm run build

Get a closer estimate 0/2 ready

Add your project folder, or drop it here, to size the steps below. stays on your computer

  • COPY your build folder Add your build folder to measure it
  • npm package-lock.json Add package-lock.json

7 ways to improve this Dockerfile

  • Without --no-install-recommends, apt also installs the packages yours “recommend”, which most containers don’t need. Add the flag, then install any of them you really need by name.

    apt-get install -y --no-install-recommends …
1 stage 5 layers added linux/amd64

How the size is worked out

We read the Dockerfile the way Docker does: line continuations, build arguments, and every stage of a multi-stage build. Only the stages that end up in the final image count; earlier build stages are shown greyed out.

  • Base image: the size its registry lists for each layer, for the platform you pick (x86-64 or ARM). This is the compressed download size.
  • apt and apk packages: the installed size from the Debian, Ubuntu or Alpine package list for that release, plus every dependency that isn’t already in the image. When apt runs without --no-install-recommends, recommended packages are counted too, because apt installs them. Packages removed again in the same step are left out.
  • Your files and app packages: add your project folder (or just the files the panel asks for) and COPY steps are measured from the folder, following .dockerignore, while npm, pip and dotnet steps are sized from the npm registry, PyPI and nuget.org. A package installed in a build stage counts on the COPY --from line that brings it into the final image.
  • Everything else: downloads, build output and anything still missing are marked “not counted”. Type a size into any of them to add it.
  • Settings: ENV, WORKDIR, CMD and similar lines don’t add a layer, so they’re 0 bytes.

The total adds a compressed size (the base) to unpacked sizes (the packages), so read it as a guide to what’s big, not as the exact number docker images will print.

Did this tool do what you needed?

© 2026 Samprix. Not affiliated with OpenAI, Anthropic or Google.