Skip to content
Latchkey

Docker Compose "no configuration file provided: not found" in CI

Compose could not find a compose file to run. It looked in the working directory for the default names and found none - usually because the file is elsewhere, named differently, or not checked out.

What this error means

A docker compose <cmd> fails immediately with no configuration file provided: not found. Nothing runs because Compose has no file to read.

docker compose output
no configuration file provided: not found
# running 'docker compose up' from a directory without a compose.yaml/docker-compose.yml

Common causes

Run from the wrong working directory

Compose looks for compose.yaml/docker-compose.yml in the current directory (and parents). If the job runs elsewhere - a monorepo subdir, a wrong working-directory - it finds nothing.

A non-default compose filename

A file named docker-compose.ci.yml or compose.prod.yaml is not picked up automatically; without -f Compose does not see it.

The compose file is not present on the runner

A gitignored or sparse-checkout-excluded compose file is absent in CI even though it exists locally.

How to fix it

Pass the compose file explicitly

Name the file with -f and/or set the working directory.

Terminal
docker compose -f deploy/docker-compose.ci.yml up -d
# or set the job working directory to where the file lives

Confirm the file exists where the job runs

List the expected compose file from the job’s working directory before running.

Terminal
pwd && ls -la docker-compose*.yml compose*.yaml 2>/dev/null
test -f docker-compose.yml || echo "no compose file here"

How to prevent it

  • Always pass -f <file> in CI rather than relying on directory defaults.
  • Set the job working-directory deliberately in monorepos.
  • Ensure compose files are committed and not excluded from checkout.

Frequently asked questions

What causes ""no configuration file provided""?
Compose looks for compose.yaml/docker-compose.yml in the current directory (and parents). If the job runs elsewhere - a monorepo subdir, a wrong working-directory - it finds nothing.
How do I fix "no configuration file provided"?
Name the file with -f and/or set the working directory.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card