Skip to content
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 Setup: docker-entrypoint.sh File Overwritten with Windows Line Endings #1467

Open
Ssyba opened this issue Jan 13, 2024 · 0 comments
Open

Comments

@Ssyba
Copy link

Ssyba commented Jan 13, 2024

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:

  1. Clone the Django project repository on a Windows machine.
  2. Follow the instructions in the documentation under "Running Locally with Docker".
  3. Run docker-compose build.
  4. Execute docker-compose up.
  5. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant