docker alpine /bin/sh script.sh not found

I was getting the same error message, but my problem was line-endings: my shell-script used MS-DOS line-endings which ash did not like. Once I converted the script file to Unix line-endings, everything worked.


Make sure the shebang on the script points to an interpreter that actually exists. Thus, if the script being invoked uses:

#!/bin/bash

...then /bin/bash needs to actually be installed. (Alternately, you might consider trying to port the script to work with POSIX sh, and modifying its shebang to /bin/sh).