Skip to content
Latchkey

docker compose up: Start Services & CI Errors

Start every service defined in a compose file.

docker compose up creates and starts the services in a compose file, with their networks and volumes. This page covers detached mode, build-on-up, and the wait flags for CI.

What it does

docker compose up builds (if needed), creates, and starts all services, attaching to their logs unless -d is given. --wait blocks until services are healthy, which is what CI wants before running tests.

Common usage

Terminal
docker compose up -d
docker compose up -d --build
docker compose up -d --wait             # wait for healthchecks
docker compose up -d db redis           # only named services

Common errors in CI

"no configuration file provided: not found" means there is no compose.yaml/docker-compose.yml in the directory - pass -f or cd to the right place. Without --wait, CI may run tests before a database is ready ("connection refused"); add healthchecks and --wait. "port is already allocated" means a leftover stack still holds the port - docker compose down first. Note: the legacy hyphenated docker-compose is the v1 binary; modern Docker uses the docker compose plugin.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →