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

  1. In the app's General/Build settings, check the "Base Directory" and "Dockerfile Location" fields match where the Dockerfile actually lives in the repo.

  2. For monorepos, set Base Directory to the subfolder that actually contains the Dockerfile, not the repo root.

  3. If you're using the Compose build pack instead, verify the build.context and dockerfile fields resolve correctly relative to Base Directory.

  4. 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

Sources

Have Emsden Studio fix it for you — from A$149

All Coolify deploy errors