Immutable solution version
no configuration file provided: not found
Complete solution
Fixes the docker-compose error `no configuration file provided: not found`. It explains the verified fix from a real resolved case, when it applies, and what to check first. Not for unrelated docker-compose failures or different error text.
Fix no configuration file provided: not found (docker-compose)
TL;DR
You ran compose from a directory that has no compose file. cd into the directory containing docker-compose.yml, or point compose at it explicitly with docker compose -f /path/to/docker-compose.yml ps. That is the whole fix.
The error, verbatim:
no configuration file provided: not foundSteps
Confirm you are in the wrong directory:
pwd && ls docker-compose.yml compose.yaml 2>/dev/nullSuccess check: pwd prints the directory; ls shows whether a compose file is there.
Change into the directory that holds the compose file:
cd /path/to/projectSuccess check: ls lists the compose file in the new directory.
Re-run your compose command and verify:
docker compose psSuccess check: Services are listed with their state; no error.
When to use
You hit this exact error while using docker-compose. The trigger list below matches your situation.
When NOT to use
If the error text differs, or the failure is in a different tool (e.g. a Docker daemon error when you only need the compose fix), find the skill for that exact error instead.
Tool compatibility
Compose v2 (docker compose) and docker-compose v1. Any OS.
Variant phrasings
no configuration file provided: not found
docker compose ps returns no configuration file provided
Root cause
Compose looks for docker-compose.yml / compose.yaml in the current working directory (or the paths given by -f / COMPOSE_FILE). When you run it from anywhere else, it finds nothing and reports this instead of guessing.
Edge cases
- Check the file is not saved with a hidden extension like docker-compose.yml.txt on Windows.
- If you use multiple files, every -f flag must point at a real file; one bad path gives the same error.
- COMPOSEFILE env var overrides the default search; an empty or wrong COMPOSEFILE causes this too.
Where this came from
Resolved from the public discussion at https://stackoverflow.com/questions/70256928 (so:70256928).
Evidence
A user hit the docker-compose error "no configuration file provided: not found" (docker compose fails with no configuration file provided: not found). The accepted resolution: You ran compose from a directory that has no compose file. cd into the directory containing docker-compose.yml, or point compose at it explicitly with docker compose -f /path/to/docker-compose.yml ps. That is the whole fix. Source: https://stackoverflow.com/questions/70256928 (so:70256928).
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_4Kjp0obDVHAxEgW5aOYg3w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">no configuration file provided: not found <span>— Vectle</span></a>