Docker Compose Cheat Sheet/Build service images

Builds images for services with a `build` section.

Section: Build and Images

Build service images

bash
bash
docker compose build
Explanation

Great when working from source.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Build and Images
Build without cache
Forces a clean rebuild without cached layers.
OpenIn sheetbashsame section
Build one service
Builds only the selected service.
OpenIn sheetbashsame section
Pull service images
Downloads images for services that use `image:`.
OpenIn sheetbashsame section
Pull while skipping buildable services
Pulls only pure image-based services.
OpenIn sheetbashsame section
Push built images
Pushes service images to their configured registries.
OpenIn sheetbashsame section
List project images
Shows images used by the current project.
OpenIn sheetbashsame section