Error: failed to spawn command: ./start.sh: Permission denied (os error 13)

OK, I’ve reproduced the problem. If you have Windows line endings on the shebang line, you will see this failure. The fix is to add an additional line to the RUN command, thus:

RUN chmod +x ./start.sh && \
    sed -i "s/\r$//g" ./start.sh

Note: this command will run relative to the working directory, so ./ is fine, but /myapp will work too.

1 Like