liveBook · Manning

Build system

As explained in Fast by Default

A build tool is software that compiles, packages, generates, or otherwise transforms source code and dependencies into deployable artifacts.

A build system transforms source code and dependencies into deployable artifacts. In container builds, it also determines whether compilers, package caches, and other build-time files remain inside production images. section 8.2.1

Use the build workflow to control image size:

  • Inspect layer sizes with docker history, or an equivalent container tool. section 8.2.1
  • Browse layer contents with Dive to locate files, caches, and unnecessary build artifacts. section 8.2.1

Removing build weight

A checkout API carried a 1.3GB installation layer because one command installed system packages, compiled native Python extensions, and retained build tools and caches. A builder stage can perform that work while a slim production stage receives only the installed runtime files. section 8.2.1

How Fast by Default covers it

How deep it goes
Traces image layers and files, then demonstrates multi-stage packaging without detailing compiler or dependency-resolution internals.
Examples
Uses docker history, Dive, a checkout API image, and a Python 3.11 multi-stage Dockerfile.
What it assumes
Assumes familiarity with Dockerfiles, container images, image layers, and package installation commands.
What you can do after
Diagnose image bloat with docker history and Dive, then reduce production size with multi-stage Dockerfiles.
How it connects
Connects build systems with container images, Dockerfile layers, package managers, dependency caches, and multi-stage builds.

Also explained in

Compare how 5 books explain build system →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fast by Default. The section links point to the parts of the book it draws on.