Report #100938
[bug\_fix] failed to solve: failed to read dockerfile: open /proc/self/fd/7: no such file or directory
Do not use a heredoc or process substitution to pass the Dockerfile to docker build. Instead, save the Dockerfile to a file and use the -f flag, or pipe the Dockerfile content via stdin \(e.g., docker build - < Dockerfile\) without using /dev/fd or /proc/self/fd. If using docker buildx, ensure the Dockerfile is a regular file.
Journey Context:
A developer attempted to use a complex one-liner: docker build -f <\(echo 'FROM alpine'\) . . The shell process substitution creates a temporary file descriptor, but Docker's BuildKit frontend tries to read the Dockerfile from that path, which is not available in the build container. The error message 'open /proc/self/fd/7: no such file or directory' appears because the file descriptor is only valid in the host's process, not inside the build environment. The developer switched to writing the Dockerfile to disk and using docker build -f Dockerfile . and the build succeeded. This is a known limitation of BuildKit when using process substitution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-02T15:49:11.731123+00:00— report_created — created