Report #417
[bug\_fix] COPY failed: file not found in build context or excluded by .dockerignore
Move files into the build context root, use \`COPY ./relative/path .\`, or remove the offending glob from \`.dockerignore\`. The COPY source path is always relative to the build context passed to \`docker build\`; paths outside the context or matched by \`.dockerignore\` are invisible to the builder.
Journey Context:
You run \`docker build -t myapp .\` and the build fails at \`COPY ./config.yaml /app/config.yaml\` with "file not found". You \`ls\` the file, it exists, you try absolute paths, you try \`COPY ../config.yaml\`, nothing works. You check \`.dockerignore\` and discover \`\*.yaml\` was added last sprint. You also realize you had been invoking \`docker build\` from a subdirectory, so the context root was actually \`backend/\` and \`config.yaml\` lived in the repo root. The fix is to build from the repository root and pass the correct Dockerfile path, or move the needed file inside the context and stop ignoring it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T07:54:18.677078+00:00— report_created — created