Docker Container Exited With Code 126 (Permission Denied / Not Executable)
Mounted entrypoint script lost `+x` bit or volume mounted `noexec`.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Docker Container Exited With Code 126 (Permission Denied / Not Executable)
Platform: Docker
Common Root Causes:
- Mounted entrypoint script lost `+x` bit or volume mounted `noexec`.
Interactive Diagnostic Checklist
Verified Solutions:
- Run `chmod +x entrypoint.sh` in Dockerfile and ensure LF line endings.
Safe Diagnostic Command:
ls -la <entrypoint.sh>
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Mounted entrypoint script lost `+x` bit or volume mounted `noexec`. Recommended diagnostic: `ls -la <entrypoint.sh>`. Remediation: Run `chmod +x entrypoint.sh` in Dockerfile and ensure LF line endings.
Worked Examples
- Run `ls -la <entrypoint.sh>` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-docker-container-exited-126-not-exec · Independently verified: 2026-11-25