A production image that ships the entire compiler toolchain alongside the compiled binary is bloated and harder to secure — multi-stage builds solve this by separating “build environment” from “runtime environment,” and naming that separation precisely is what keeps a Dockerfile review productive.
Key Vocabulary
Build stage — a named section of a Dockerfile (FROM node AS builder) that runs compilation, dependency installation, or bundling, whose intermediate layers never ship in the final image unless explicitly copied out.
“The build stage installs all the dev dependencies and runs the TypeScript compiler, but none of that ends up in the final image — only the compiled JavaScript does.”
COPY —from — the instruction that pulls specific files or directories from an earlier build stage into the current one, the mechanism that actually moves compiled artifacts across stages.
“We use COPY --from=builder /app/dist ./dist to bring just the compiled output into the runtime stage, leaving the entire node_modules dev install behind.”
Runtime stage — the final stage in a multi-stage Dockerfile, typically based on a minimal image, that contains only what’s needed to run the application, not to build it.
“The runtime stage is based on node:slim with no compilers at all — it just runs the JavaScript that got copied in from the build stage.”
Base image — the image referenced in a FROM instruction that a stage builds on top of, chosen per stage based on what that stage actually needs (a full SDK for building, a minimal distro for running).
“We picked a full SDK base image for the build stage and a distroless base image for the runtime stage — different jobs, different requirements.”
Layer caching — Docker’s mechanism for reusing unchanged intermediate layers across builds, which multi-stage builds interact with by letting dependency-install layers stay cached even when only application code changes.
“Ordering the COPY package.json and install step before copying the rest of the source means layer caching skips the reinstall unless dependencies actually changed.”
Common Phrases
- “Is this dependency needed in the runtime stage, or just for building?”
- “We’re copying the compiled binary across with
COPY --from, so the build tools never reach production.” - “Can we shrink this by switching the runtime stage to a smaller base image?”
- “That layer isn’t caching because the copy order invalidates it on every source change.”
- “Which stage does this instruction belong in — build or runtime?”
Example Sentences
Explaining an image size reduction in a PR:
“This multi-stage build cut the final image from 1.2GB to 180MB — the build stage still has the full compiler toolchain, but the runtime stage only copies out the compiled binary via COPY --from=builder.”
Reviewing a Dockerfile that skipped staging: “Right now everything’s in one stage, so the shipped image includes the entire build toolchain. Splitting this into a build stage and a slim runtime stage would meaningfully reduce the attack surface.”
Diagnosing a slow CI build:
“The build stage is reinstalling dependencies on every run because the COPY . . happens before the install step — reordering it so dependency files are copied first would let layer caching actually kick in.”
Professional Tips
- Name build stage and runtime stage explicitly when reviewing a Dockerfile — reviewers often can’t tell at a glance which instructions belong to which without the labels.
- Point out unnecessary tools or dependencies that leaked into the runtime stage — a common review comment is “does this need to be here, or is it a build-only dependency?”
- Recommend
COPY --fromexplicitly instead of installing build tools directly in the final stage — it’s the single change that most reduces image size and CVE surface. - Mention layer caching order when a build is slower than expected — copying source before dependency manifests is a frequent, easily fixed cause.
Practice Exercise
- Write a sentence explaining why the runtime stage should not include the compiler toolchain.
- Explain what
COPY --from=builderdoes in your own words. - Describe how instruction order affects layer caching in a multi-stage build.
In Practice: Navigating Feedback & Collaboration
Let’s face it – technical communication isn’t just about writing code. It’s a crucial skill when working in teams, especially when dealing with complex processes like Docker multi-stage builds. For non-native English speakers, the nuances of professional phrasing can be particularly challenging. Consider this scenario: Sarah, a developer on a project using Docker, is reviewing a pull request submitted by Mark. Mark has used a multi-stage build to create an image for their new API service. The PR description is…sparse. It simply states “Builds the API.”
Mark’s lack of detail immediately raises a flag. A good review comment isn’t just about pointing out problems; it’s about facilitating understanding and ensuring future maintainability. Instead of saying, “This build is unclear,” Sarah might respond in Slack with something like, “Hi Mark, could you elaborate on the stages used in this build? Specifically, I’d like to understand which base image you’re starting from and what steps are involved in copying dependencies into the final artifact. Knowing this helps us assess potential size bloat and ensure our deployment process remains efficient.” This phrasing uses precise vocabulary – “base image,” “dependencies,” “artifact” - terms frequently encountered when discussing build processes. It focuses on why clarity is important (“assess potential size bloat,” “ensure our deployment process remains efficient”) rather than simply stating a demand for more information.
Another common situation arises during PR descriptions themselves. When proposing a new multi-stage build, it’s vital to be explicit about the reasoning behind each stage. Saying “This builds the application” isn’t enough. Instead, you might write: “This multi-stage build utilizes a Node.js base image (node:16) for compiling the frontend and backend code. The first stage compiles the source into an optimized JavaScript bundle, which is then copied to a smaller Alpine Linux base image in the second stage. This minimizes the final image size by excluding unnecessary development tools.” This level of detail demonstrates professionalism and allows reviewers to quickly grasp the build’s purpose and potential impact. It’s about conveying intent – that you’ve considered optimization and security best practices.
Finally, remember that concise language is key. Avoid overly verbose descriptions. Focus on delivering crucial information efficiently. Using terms like “intermediate artifact” or “layer” when discussing Docker builds can often streamline communication, but only if your audience understands those terms.
Here’s a simple example demonstrating how to specify the Dockerfile instruction for copying files between stages:
FROM node:16 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# Build the application
RUN npm run build
FROM alpine:latest AS final
COPY --from=builder /app/dist ./public Keep practising
Turn this article into muscle memory
Five-minute exercises with instant feedback — built from the same kind of real IT language.
What to read next
Frequently asked questions
What will I learn from "English for Docker Multi-Stage Builds"?
This is a Intermediate-level Vocabulary article covering vocabulary, docker, containers and devops. Learn the English vocabulary for Docker multi-stage builds: build stages, artifact copying, and final image size, explained for discussing container builds clearly.
Is this article free to read?
Yes. Every article on CoderSlingo, including this one, is free to read with no account, sign-up, or paywall.
How is reading this article different from doing an exercise?
Articles like this one explain concepts and vocabulary in context through prose, while exercises are interactive drills — fill-in-the-blank, matching, and multiple-choice — that test and reinforce specific terms. Reading builds understanding; exercises build recall.
Can I practice the vocabulary used in this article?
Yes — this article's topic lines up with our vocabulary exercises. Use the "Practice this vocabulary" link below to jump straight into a matching drill.
How long does "English for Docker Multi-Stage Builds" take to read?
About 7 min. Most CoderSlingo articles, including this one, are written to be read in one sitting, without needing a dictionary open in another tab.
Do I need to create an account to read or save this article?
No account is required to read any article. If you complete exercises elsewhere on the site, your progress is saved locally in your browser — no login needed.
What if I don't understand a technical term used in this article?
Check the site Glossary for plain-English definitions of common IT terms, or browse the #vocabulary tag page for other Vocabulary articles that use the same vocabulary in different contexts.
Can I share or link to "English for Docker Multi-Stage Builds"?
Yes — use the Twitter/X or LinkedIn share buttons at the end of the article, or copy the page URL directly. Attribution back to CoderSlingo is appreciated but the content is free to reference.
When was this Vocabulary article published?
This article was published in 2026. New Vocabulary articles are added regularly — visit the #vocabulary tag page to see the full, continuously updated list.
Where can I find more articles like this one?
See "English for Docker Compose", "Docker Vocabulary: 30 Essential Terms for Containerisation", "English for Podman Developers" in the Related Articles section below, or browse all Vocabulary articles from the main Blog index.