Fix "failed to solve with frontend dockerfile.v0" on Coolify
Error: failed to solve with frontend dockerfile.v0: failed to read dockerfile
BuildKit can't find the Dockerfile at the path Coolify passed it, so the build fails before a single instruction runs.
This is BuildKit's own generic "can't find the Dockerfile" error, and on Coolify it almost always comes down to a path mismatch: the app's "Base Directory" and/or "Dockerfile Location" field points somewhere different from where the Dockerfile actually lives in the repo — very common in monorepos where the Dockerfile sits in a subfolder, not the repo root. It can also happen when the build context ends up empty, which breaks any relative COPY paths inside the Dockerfile even if the Dockerfile itself is found.
The fix
In the app's General/Build settings, check the "Base Directory" and "Dockerfile Location" fields match where the Dockerfile actually lives in the repo.
For monorepos, set Base Directory to the subfolder that actually contains the Dockerfile, not the repo root.
If you're using the Compose build pack instead, verify the build.context and dockerfile fields resolve correctly relative to Base Directory.
Re-check the build log for the specific missing path reported at the COPY step — it tells you exactly which relative path is not resolving.
Verify it worked
The build log shows BuildKit reading the Dockerfile and each COPY step succeeding, instead of failing at the solve step.
Related Coolify errors
- Nixpacks was unable to generate a build plan for this app. / No setup or build phase could be determined (could not determine how to build the app)
- sh: 1: vite: not found (exit code 127) — also seen as "tsc: not found", "next: not found", "react-scripts: not found" during npm run build
- NET::ERR_CERT_AUTHORITY_INVALID
- TRAEFIK DEFAULT CERT / self-signed certificate