Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Docker build fails on Windows due to autocrlf. #721

Open
jchv opened this issue Jan 20, 2021 · 0 comments
Open

Docker build fails on Windows due to autocrlf. #721

jchv opened this issue Jan 20, 2021 · 0 comments

Comments

@jchv
Copy link

jchv commented Jan 20, 2021

Currently, performing

docker build -t mcsema .

in a freshly cloned mcsema repository will fail on Could not find interpreter: bash\r due to script binfmt being intolerant of carriage returns (and bash is as well, IIRC, so running bash directly instead wouldn't do any good.)

I believe this can be remedied simply by adding

*.sh text eol=lf

into a file called .gitattributes in the root of the repository, to ensure that the shell scripts are never converted to crlf.

Existing checkouts on Windows will still have crlf copies of the shell scripts, but new checkouts should no longer have this issue.

I can confirm that converting the shell scripts called by cmake install to UNIX line endings allows a Docker build to succeed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant