Report #8784
[bug\_fix] COPY failed: file not found in build context: stat : file does not exist
Remove the file or directory pattern from the .dockerignore file, or adjust the pattern so it no longer matches the required file.
Journey Context:
A developer adds a new configuration file to their project and updates the Dockerfile with COPY config.yaml /app/. The build fails, claiming the file doesn't exist in the build context. The developer verifies the file is absolutely there on their local disk. They spend time checking for typos and path issues. Finally, they look at the .dockerignore file and discover a broad pattern like \*.yaml or config/ that is excluding the file from being sent to the Docker daemon. Removing the pattern from .dockerignore resolves the build failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:22:43.619900+00:00— report_created — created