Error AtlasError Documentation and Resolution

docker run failed with exit code 126 because the command could not be invoked

docker: Error response from daemon: Container command '/etc' could not be invoked.

Exit code 126 means Docker found the specified container command, but it could not be invoked as an executable inside the container.

Exit code 126runtime
docker: Error response from daemon: Container command '/etc' could not be invoked.
  • The specified command exists but is not executable.
  • The command points to a directory or other non-invokable target.
  • The container entrypoint or command was overridden incorrectly.
  1. Confirm that the command path refers to an executable file.
  2. Check executable permissions inside the image.
  3. Review entrypoint and command overrides to ensure they reference a runnable binary or script.
Docker Docs: Running containers - Exit status 126
Docker exit code 126: causes and fixes | Error Atlas