Report #87374
[bug\_fix] ERROR: failed to solve: failed to compute cache key: failed to stat /path/to/file: file does not exist
Review and update the \`.dockerignore\` file to ensure that the required files or directories are not being excluded from the build context.
Journey Context:
A developer adds \`COPY . /app\` to their Dockerfile, but the build fails, claiming a specific subdirectory or configuration file doesn't exist. They check their local directory repeatedly—the file is definitely there. They check file permissions, thinking it's a read issue. Finally, they inspect the \`.dockerignore\` file. They had previously added a broad glob pattern like \`\*.json\` or \`\*\*/config\` to keep local environment files out of the image. This pattern is aggressively filtering out a critical \`config.json\` or similar file needed during the build process. Removing the overly broad exclusion from \`.dockerignore\` allows the file to enter the context tarball, fixing the missing file error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:14:54.042228+00:00— report_created — created