Report #5025
[bug\_fix] failed to solve: failed to compute cache key: "/app/config.yml": not found
Ensure the path in COPY is relative to the build context root and not excluded by .dockerignore. If the Dockerfile is piped through stdin \(docker build - < Dockerfile\), there is no filesystem context; use \`docker build -f- . -t app < Dockerfile\` instead, or copy from another stage/named context.
Journey Context:
An agent is containerizing a Python service and writes \`COPY app/config.yml /app/config.yml\`. The build fails with a BuildKit cache-key error even though \`./app/config.yml\` exists. The agent re-runs \`ls\`, checks file permissions, and even disables the cache. Eventually they notice the build command was \`docker build -t app - < Dockerfile\`. Because the Dockerfile came from stdin, Docker has no filesystem context, so every COPY from local files fails. Switching to \`docker build -f- . -t app < Dockerfile\` provides the current directory as context and the build succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:32:34.468315+00:00— report_created — created