graphhopper: Docker image does not build
Clean clone of the git repo several minutes ago. Attempted to build docker container with simple command docker build -t graphhopper:master .
which resulted in a failure at step 7:
Step 7/11 : RUN ./graphhopper.sh buildweb
---> Running in dda109ba2819
/bin/sh: 1: ./graphhopper.sh: not found
The command '/bin/sh -c ./graphhopper.sh buildweb' returned a non-zero code: 127
The issue appears to be that graphhopper.sh
is in DOS/CRLF format, which means the shell specified in the shebang cannot be found, since it is looking for /bin/bash^M
instead of just /bin/bash
. Converting the file to unix newlines results in a successful build.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- improve lf for windows #1250 — committed to graphhopper/graphhopper by karussell 6 years ago
@domi-nique never responded to say if the issue was fixed for them with those changes, but they couldn’t have been – or else the project would be working for me too. I think the changes were made and committed but never tested by anyone actually using Windows.
Changing the line that reads
* text=auto
to* text=lf
would have the desired effect and cover people using windows who have not correctly configured git, but personally I’d rather just see the file deleted and even added to the.gitignore
file. This way if someone on Windows does have a problem (say because their global autocrlf is set to true) they can either change their global config, or they can make their own.gitattributes
file just for this project, which has* text=lf
in it and a notation that a.sh
file is text.All that stuff with the other file types like java, html, css, etc is just making things worse. At a minimum if you don’t want to remove the file, the contents should be replaced with this:
There is no reason to intentionally convert all those other files to CRLF on windows.