Rebuild images before starting containers.
Section: Project Lifecycle
Build and start services
bash
bash
docker compose up --buildExplanation
Useful when Dockerfiles or build contexts changed.
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 Project Lifecycle
Start services in foreground
Builds, creates, and starts all services defined in the Compose project.
Start existing containers
Starts previously created services without recreating them.
Stop running services
Gracefully stops running containers in the project.