Report #104560
[bug\_fix] COPY failed: no source files were specified
Ensure all COPY source paths are relative to the build context directory and do not use absolute paths or paths that escape the context root \(e.g., \`../file\`\). Use \`COPY . /app\` or \`COPY ./src /app/src\`.
Journey Context:
A developer was building a Docker image with a Dockerfile that included \`COPY ../config /app/config\`. The build failed with 'COPY failed: no source files were specified'. The developer assumed the file existed but the error persisted. After checking the build context, they realized the Docker daemon only sends the context directory \(the argument to \`docker build\`\) to the builder. Any path that resolves outside that directory is ignored. The fix was to restructure the project so that the config file is inside the context, or use a \`.dockerignore\` to exclude unnecessary files and place the config in a subdirectory. This is a classic mistake: Docker's COPY is not a general file copy but operates within the build context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-06T20:05:44.589814+00:00— report_created — created