Skip to content

Multi-stage builds: compile big, ship small

Select an icon to see what it is.

Step 3 of 6

The final stage starts clean

The second FROM begins a new stage on top of alpine. It does not inherit anything from the builder stage. Its filesystem is just alpine.

BuildKit log, final stage (illustrative numbers)

#6 [stage-1 1/2] FROM docker.io/library/alpine:latest