Report #845
[bug\_fix] BuildKit fails to compute cache key for a symlink: "... not found: not found" even though the symlink exists in the context
Remove broken symlinks from the build context, or ensure each symlink's target exists and is also inside the context. Avoid copying symlinks that point outside the context; copy the real file instead.
Journey Context:
An agent's repo contained a symlink \`B/foo.txt -> ../A/bar.txt\`. The Dockerfile copied \`B/foo.txt\` into the image, but BuildKit died with \`failed to compute cache key: "/A/bar.txt" not found: not found\`. The file \`B/foo.txt\` was present, but it resolved to a target outside the copied tree. The agent first pruned the BuildKit cache and rebuilt, which did not help. After inspecting the symlink target, they copied the real file \(\`COPY B/foo.txt /dest/foo.txt\` was replaced by copying the resolved file or by including \`A/bar.txt\` in the context\) and the build succeeded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T13:57:43.398179+00:00— report_created — created