open-semantic-search icon indicating copy to clipboard operation
open-semantic-search copied to clipboard

Docker compose in Windows - line ending problem

Open BobHamburg opened this issue 2 years ago • 0 comments

I have tried to build docker images on windows. The apps container crash fast with a standard_init_linux.go:228: exec user process caused "no such file or directory failure.

The reason is a a CRLF issue. On windows the standard checkout of a git repo is with CRLF ending. This lead to the problem in the container.

To solve this issue I add open-semantic-search.gitattributes with this text

  • text=auto eol=lf

to my git repository

All new checkouts are now with LF ending and not anymore CRLF ending.

If your checkout is already with the wrong ending you can fix it with this: From https://stackoverflow.com/questions/9976986/force-lf-eol-in-git-repo-and-working-copy

git rm --cached -r .  # Remove every file from git's index. git reset --hard      # Rewrite git's index to pick up all the new line end

Then all files from this repop are not anymore with CRLF but with LF. Check with notepadd++ for example. The submodules are still with wrong line ending. There are additional .gitattributes files needed.

I could not push to the repo, as expected. What is the policy for changes. Pull Requests?

BobHamburg avatar May 03 '22 15:05 BobHamburg