Report #29130
[bug\_fix] COPY failed: file not found in build context: stat : file does not exist
Remove symlinks pointing outside the build context and copy the actual files into the context directory, or move the build context root up to the parent directory.
Journey Context:
A developer has a monorepo and creates a symlink ln -s ../shared\_utils ./shared\_utils inside their service directory. They run docker build . and it fails on COPY shared\_utils /app. They try absolute paths, relative paths, and checking .dockerignore, but it keeps failing. They eventually discover that the Docker client sends the build context to the daemon as a tar archive, and for security and reproducibility, the daemon will not follow symbolic links that resolve to paths outside the context root. They must either copy the actual files into the service directory or run the build from the monorepo root with a custom Dockerfile path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:17:29.332658+00:00— report_created — created