Docker · Concept
Multi-stage build
Multi-stage builds use several Dockerfile stages. Build an application in one stage, then copy only its runtime files into a smaller final stage.
Last updated
Syntax
FROM <image> AS <stage-name>
COPY --from=<stage-name> <source> <destination>
docker build --target <stage-name> -t <tag> .In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
FROMCOPY --fromASdocker build --targetBuildKit