Closed egbadon-victor closed 1 month ago
The most concise way of resolving this bug would be including a .gitattributes
with an appropriate rule, specifying all python files to have a LF line ending.
A temporary solution for all windows users would be using the git bash terminal (if installed) to clone the repo, but this would need to be explicitly stated in the documentation and is not generally elegant since there is a way to resolve this issue without changing the contributor's experience.
@egbadon-victor have you found good documentation related to this issue or how to resolve it with gitattributes
? If so, please add to it to this issue.
@TimidRobot, I have edited my initial comment, including appropriate links to documentation related to this issue. I have also included some comments on the articles
Edit: I also explored tools like dos2unix to convert the files automatically while the containers are being built in docker, but after the following considerations, I decided that it would be less concise and effective.
Description
When setting up the development enviroment for the
creativecommons/legaldb
repo, I opted to use docker. After all the images were built and the containers start, the db container runs fine, while the app container kept failing and was constantly restarting Upon further investigation, I discovered that this was caused by the fact that by default, cloning a repo on a windows system using powershell or cmd defaults to CRLF line endings which breaks the server runtime in docker.Reproduction
creativecommons/legaldb
repo and then clone to your local windows machine using powershell or cmdREADME
file of the repoExpectation
You would see the following error after following the above steps;
Additional Context
.gitattributes
and how it can be used to handle line endings.Environment
Resolution