Report #13347
[bug\_fix] executor failed running \[/bin/sh -c ...\]: executable file not found in $PATH
Install the missing utility \(e.g., \`apk add --no-cache curl\` for Alpine\) or, if using \`FROM scratch\`, ensure the copied binary is statically compiled and not dynamically linked against glibc.
Journey Context:
A developer switches their base image from \`ubuntu\` to \`alpine\` to reduce image size. The \`RUN curl ...\` command immediately fails with 'executable file not found'. They know \`curl\` works on their host. They try updating \`PATH\` but it doesn't help. The rabbit hole leads to discovering that Alpine Linux is designed to be minimal and does not ship with common utilities like \`curl\`, \`bash\`, or \`git\` by default. The shell cannot find the binary because it simply isn't in the image. A similar trap occurs with \`FROM scratch\`: a developer copies a Go binary built on Ubuntu into \`scratch\` and gets the same error. In this case, the binary is dynamically linked against glibc \(\`/lib64/ld-linux-x86-64.so.2\`\), which doesn't exist in \`scratch\`. The fix is to compile with \`CGO\_ENABLED=0\` or install the missing packages in Alpine.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:26:18.563483+00:00— report_created — created