Skip to content

Docker

Multi-stage build

Quick answer

A multi-stage build uses several FROM instructions so build-time tooling stays out of the final image.

A multi-stage build uses several FROM instructions so build-time tooling stays out of the final image.

Why it matters

It reduces image size and attack surface at the same time. The compiler that built your binary has no business shipping to production alongside it.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.