Docker "standard_init_linux: exec user process caused permission denied" in CI
When the runtime tries to exec the container entrypoint and the file lacks the executable bit (or a script has a bad interpreter line), the kernel returns EACCES and the container dies at startup with "exec user process caused: permission denied".
What this error means
A container exits immediately with standard_init_linux.go:228: exec user process caused: permission denied.
standard_init_linux.go:228: exec user process caused: permission deniedCommon causes
The entrypoint file is not executable
A COPYed script or binary without the +x bit cannot be exec'd.
A script copied from a non-exec host file
Files copied from Windows or an archive often lose the executable bit.
A bad shebang on a wrapper script
A shebang pointing at an interpreter that is not present can surface as a permission/exec failure.
How to fix it
Set the executable bit during build
- Use
COPY --chmod(BuildKit) or aRUN chmodto make the entrypoint executable.
COPY --chmod=755 entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]Fix the interpreter line for scripts
- Ensure the shebang points at a shell present in the image.
#!/bin/sh
exec "$@"How to prevent it
- Mark entrypoints executable at build time with
--chmodorRUN chmod. - Verify the shebang interpreter exists in the target base image.