liveBook · Manning

Build context

A Docker build context is the set of files and directories supplied to Docker as input for building a container image.

How 2 Manning books explain it

Learn Docker in a Month of Lunches, Second Edition

A build context is the directory and its contents supplied to Docker as input for building a container image.

How it is used
Supplies the Dockerfile and related files for image builds in local development and CI workflows.
How deep it goes
Defines the CLI directory argument and explains context transfer and exclusions, without detailing BuildKit internals.
Examples
Contrasts a Compose context with nested Dockerfiles and image builds using precise COPY or .dockerignore.
What you can do after
Operate/configure it by selecting a CLI or Compose context and excluding unnecessary files with .dockerignore.

Read how Learn Docker in a Month of Lunches, Second Edition explains build context →

Kubernetes in Action, Second Edition

A build context is the set of files and directories supplied to Docker for building a container image.

How it is used
Uses a directory of application artifacts as Docker’s input for building a container image.
How deep it goes
Explains directory selection, daemon upload, remote-daemon implications, and performance impact without detailing context filtering internals.
Examples
Demonstrates `docker build -t kiada:latest .` with `app.js`, an `html` directory, and a minimal Dockerfile.
What you can do after
Builds a tagged container image from a local directory using the Docker CLI.

Read how Kubernetes in Action, Second Edition explains build context →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.