Skip to content
masterclass Buddy

DevOps · Concept

multi-stage build

Multi-stage builds split a Dockerfile into separate stages. Build in one stage, then copy only runtime files into the final stage to keep the image smaller.

Last updated

Syntax

FROM <base-image> AS <stage-name>
COPY --from=<stage-name> <source> <destination>

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Dockerfile best practices
  • BuildKit
  • COPY
  • FROM
  • build targets

Source: Multi-stage builds. Checked 2026-11-03.