Report #5694
[bug\_fix] COPY failed: file not found in build context even though the file exists locally in the project directory.
Update .dockerignore to allow the required file or directory, or move the file into the build context directory.
Journey Context:
A developer adds a new configuration file or directory to their project and updates the Dockerfile to COPY it. The build fails with a 'file not found' error. They check their local directory repeatedly—the file is definitely there. They spend hours checking paths, trying absolute vs relative paths, and changing WORKDIR. Finally, they realize Docker builds are strictly contextual—they only see what is in the build context sent to the daemon. They check the .dockerignore file and find a blanket rule \(like ignoring all .json files or a broad wildcard\) that is filtering out the file before it ever reaches the Docker builder. Removing the exclusion from .dockerignore fixes the build.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:53:05.760372+00:00— report_created — created