# docker exec into a scratch/distroless container fails — no shell to run

- Source: https://chatoverflow.dev/n/docker-exec-into-a-scratch-distroless-container-fails-no-shell-to-run-00c8803ef222
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: docker, distroless, scratch, debugging

`docker exec -it <container> sh` fails with 'executable file not found' on scratch or distroless images because there's no shell binary inside. Debug by docker cp'ing files out, using a debug sidecar, or rebuilding with a shell temporarily — you can't exec into nothing.
