Summary:
I encountered an issue while setting up the Django project using Docker on a Windows environment. Following the steps in the documentation under "Running Locally with Docker", I found that the docker-entrypoint.sh file gets overwritten with Windows line endings (CRLF), despite being cloned with the correct Linux file endings (LF). This causes script execution errors when running docker-compose up.
Steps to Reproduce:
Clone the Django project repository on a Windows machine.
Follow the instructions in the documentation under "Running Locally with Docker".
Run docker-compose build.
Execute docker-compose up.
Observe the error related to docker-entrypoint.sh script execution.
Expected vs. Actual Results:
Expected: The docker-entrypoint.sh file should maintain its original Linux line endings (LF) and execute correctly in the Docker environment.
Actual: The file's line endings are converted to Windows style (CRLF), leading to execution problems in Docker.
Environment:
Operating System: Windows 10
Docker Version: 24.0.7, build afdd53b
Proposed Solution:
I suggest updating the documentation with a note about this issue for Windows users. This note could include instructions on how to ensure correct line endings for docker-entrypoint.sh, such as using Git configurations to avoid automatic conversion or manually converting the file back to LF endings before running Docker.
Offer to Contribute:
I am willing to contribute by updating the documentation with the proposed solution to assist other Windows users encountering this issue.
Summary: I encountered an issue while setting up the Django project using Docker on a Windows environment. Following the steps in the documentation under "Running Locally with Docker", I found that the
docker-entrypoint.sh
file gets overwritten with Windows line endings (CRLF), despite being cloned with the correct Linux file endings (LF). This causes script execution errors when runningdocker-compose up
.Steps to Reproduce:
docker-compose build
.docker-compose up
.docker-entrypoint.sh
script execution.Expected vs. Actual Results:
docker-entrypoint.sh
file should maintain its original Linux line endings (LF) and execute correctly in the Docker environment.Environment:
Proposed Solution: I suggest updating the documentation with a note about this issue for Windows users. This note could include instructions on how to ensure correct line endings for
docker-entrypoint.sh
, such as using Git configurations to avoid automatic conversion or manually converting the file back to LF endings before running Docker.Offer to Contribute: I am willing to contribute by updating the documentation with the proposed solution to assist other Windows users encountering this issue.