Problem
Certain files are expected to be in LF line-endings during the Docker build process, but depending on a users' git config core.autocrlf setting, these files might not be converted correctly for Windows users.
Motivation
Tunnistamo Docker container cannot be run successfully on Windows-based platforms.
Solution
Two files that should be changed are ./docker-entrypoint.sh and ./manage.py.
If ./docker-entrypoint.sh is some other line-ending than LF, the following error will be given when the docker container tries to start:
exec ./docker-entrypoint.sh: no such file or directory
If ./manage.py is some other line-ending than LF, the following error will be given:
Applying database migrations...
/usr/bin/env: ‘python\r’: No such file or directory
The following additions to ./.gitattributes should be made to fix the issues:
manage.py text eol=lf
*.sh text eol=lf
Additionally, the command git add --renormalize . should be run to convert the line endings according to these rules.
Problem
Certain files are expected to be in LF line-endings during the Docker build process, but depending on a users' git config
core.autocrlfsetting, these files might not be converted correctly for Windows users.Motivation
Tunnistamo Docker container cannot be run successfully on Windows-based platforms.
Solution
Two files that should be changed are
./docker-entrypoint.shand./manage.py.If
./docker-entrypoint.shis some other line-ending than LF, the following error will be given when the docker container tries to start:exec ./docker-entrypoint.sh: no such file or directoryIf
./manage.pyis some other line-ending than LF, the following error will be given:Applying database migrations... /usr/bin/env: ‘python\r’: No such file or directoryThe following additions to
./.gitattributesshould be made to fix the issues:Additionally, the command
git add --renormalize .should be run to convert the line endings according to these rules.