Report #3288
[bug\_fix] COPY failed: file not found in build context despite the file existing in the repository
Remove the file or directory pattern from the \`.dockerignore\` file, or adjust the pattern to allowlist the specific file needed in the build.
Journey Context:
A developer adds a new configuration file \`app.conf\` and writes \`COPY app.conf /etc/app/\` in the Dockerfile. The build fails instantly claiming the file doesn't exist. They check the local directory repeatedly, verify case sensitivity, and check git tracking—everything is perfect. They waste an hour debugging Docker daemon permissions before remembering the \`.dockerignore\` file. Sure enough, an earlier developer had added a blanket \`\*.conf\` rule to keep local configs out of the image. The Docker CLI strictly filters the build context tarball using \`.dockerignore\` before sending it to the daemon. Removing or scoping the exclusion fixes the build immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:19:19.919144+00:00— report_created — created