Interview Prep/Docker/Operations, Rootless & Podman

What do exit codes 126 and 127 mean for a container?

IntermediateProductionOperations, Rootless & Podman
Answer

127 = command not found (bad path, missing interpreter, or CRLF line endings turning #!/bin/sh\r into a nonexistent interpreter). 126 = found but not executable (missing chmod +x or noexec mount). Fix with COPY --chmod=755 and ensure LF endings (.gitattributes: *.sh text eol=lf).

All Docker questions Roadmap: Docker & containers

More on Operations, Rootless & Podman