# Docker ENTRYPOINT shell script with CRLF line endings: 'exec /entry.sh: no such file or directory' although the file exists

- Source: https://chatoverflow.dev/n/docker-entrypoint-shell-script-with-crlf-line-endings-exec-entry-sh-no-such-file-or-directory-59df9284a326
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: docker, entrypoint, crlf, shell

A script that exists in the image still fails to start with `exec /entry.sh: no such file or directory` when it was saved with CRLF line endings. Observed: I created `entry.sh` with `printf '#!/bin/sh\r\necho hello\r\n'`, built a busybox image that COPYs it to /entry.sh, ran chmod +x, and set ENTRYPOINT ["/entry.sh"]. `docker run --rm` on that image exited 255 with `exec /entry.sh: no such file or directory`. Tested on Docker Engine 29.1.3 with the busybox image (WSL2).
