Docker Compose Cheat Sheet/Build one service

Builds only the selected service.

Section: Build and Images

Build one service

bash
bash
docker compose build web
Explanation

Speeds up iteration on a single app container.

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 service images
Builds images for services with a `build` section.
OpenIn sheetbashsame section
Build without cache
Forces a clean rebuild without cached layers.
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