thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Intermediate

Multi-Stage Build

A Dockerfile technique using multiple FROM stages so build tools stay in early stages and only needed artifacts are copied to the final image.

Definition

Multi-stage builds produce smaller, more secure images by excluding compilers and build dependencies. COPY --from=<stage> transfers artifacts between stages.

Example

FROM golang:1.23 AS build ... FROM gcr.io/distroless/static COPY --from=build /out/app /app

Exam tip

Multi-stage builds are the standard answer for reducing image size and attack surface.

Related terms