Report #101009
[bug\_fix] \`docker build - < Dockerfile\` fails on COPY with 'failed to compute cache key: not found'
Provide a filesystem build-context and use \`-f\` to point at the Dockerfile: \`docker build -f Dockerfile .\` \(or \`docker build -f- . <
Journey Context:
A developer generates a Dockerfile from a template and pipes it to Docker with \`docker build - < Dockerfile\`. The Dockerfile contains \`COPY main.c .\`, and the build immediately fails because the builder has no context: stdin is treated as a text-file Dockerfile, not as a directory. They switch to \`docker build -f Dockerfile .\` so the current directory becomes the context, and the COPY succeeds. The root cause is that a plain-text build context has no filesystem; COPY/ADD can only reference local files when a directory/tarball/Git context is supplied.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:49:45.069157+00:00— report_created — created