OCI runtime create failed: exec: "x": executable file not found in $PATH
The command you asked the container to run doesn’t exist inside the image — wrong command name, a shell that isn’t installed (bash on Alpine), or a PATH problem.
Seen on:
Docker
Meaning
CMD/ENTRYPOINT or the command after the image name is executed inside the container’s filesystem. Minimal images (alpine, distroless, scratch) don’t include bash, curl or even sh. The JSON form of CMD also doesn’t expand variables or use a shell.
Common causes
- bash not installed (Alpine uses sh; distroless has no shell)
- Typo in CMD/ENTRYPOINT or the run command
- Binary installed to a directory not on PATH
- Image name accidentally followed by an argument interpreted as the command
⚡ Quick fix
- Use sh instead of bash, or install bash
- Run the binary by absolute path
- Check what exists: docker run --rm image ls /usr/local/bin
Detailed fix by platform
Docker
- bash
docker exec -it mycontainer sh # Alpine: sh, not bash docker run --rm --entrypoint sh myimage -c 'echo $PATH; which node'
Dockerfile
- bash
RUN apk add --no-cache bash # if you really need bash on Alpine CMD ["node", "server.js"]
How to diagnose
- Command — What exactly is being executed?
- Image — Base image type (alpine/distroless/scratch)
- PATH — echo $PATH inside the container
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Docker
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026