Report #52582
[bug\_fix] COPY failed: file not found in build context: required file does not exist
Update the .dockerignore file to remove rules blocking the required files, or use \! to explicitly whitelist them.
Journey Context:
Developer adds COPY config/ /app/config/ to their Dockerfile. The build fails, claiming the files don't exist. They verify the files are right there in their local directory. They spend hours checking paths, typos, and build context boundaries. Finally, they look at the .dockerignore file and find a blanket \* or a config/ rule that is excluding the directory from the build context sent to the daemon. The root cause is that .dockerignore takes precedence over COPY and silently drops files from the context. The fix is removing or negating \(\!config/\) the rule in .dockerignore.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:45:16.089007+00:00— report_created — created