-
-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'docker-compose up' not working on Windows #990
Comments
can you assigne this to me i will love to work on it sir |
can you try this '*.sh text eol=lf'. This tells git to treat all .sh files as text files and to use LF line endings when checking out and committing changes. You can create this file in the root directory of your git repository, commit it, and then push the changes to the remote repository. This should resolve the issue you're facing with the docker-entrypoint.sh script not being executable on windows due to CRLF line endings. |
Fixes #1467 and #990 --------- Co-authored-by: Baptiste Mispelon <[email protected]>
Fixed in 15beb3a |
When running
docker-compose up
, I receive the following error:After further examination, I have discovered that this happens because of the CRLF line endings on Windows. Basically, the
core.autocrlf=true
Git setting (which is preselected by default on the Windows Git installer) changes LF line endings to CRLF line endings on check out. Those CRLF line endings prevent the proper execution of .sh scripts. In this case, thedocker-entrypoint.sh
script, which runs automatically when executing thedocker-compose up
command, cannot be executed.Since most Windows users will encounter the same issue (many do not change the default setting preselected in the installer), it will probably be good to add a
.gitattributes
file to explicitly instruct Git to keep the original LF line endings of .sh scripts.Perhaps, it is possible to add a
.gitattributes
file similar to the one that GitHub recommends: https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endingsHere are some additional resources concerning this problem:
(1) actions/checkout#135
(2) https://www.edwardthomson.com/blog/git_for_windows_line_endings.html
The text was updated successfully, but these errors were encountered: