Skip to content

Windows checkout: container fails to start due to CRLF (^M) in start.sh (Docker on Windows) #94

@hyeonseo2

Description

@hyeonseo2

While running the project via Docker on Windows, the container fails to start because start.sh is interpreted with CRLF line endings.
If helpful, I’d like to propose a minimal fix: adding a .gitattributes entry to enforce LF for *.sh.

Environment

  • Windows 11 (WSL)
  • Project: hf-mcp-server (Docker build & run)

Steps to Reproduce

  1. Clone the repo on Windows with default Git settings (core.autocrlf=true)
  2. docker build -t hf-mcp-server .
  3. docker run --rm -p 3000:3000 hf-mcp-server

Actual

Container fails to start; start.sh is parsed with CRLF:

: not found line 2:
: not found line 11:
./start.sh: line 34: syntax error: unexpected word (expecting "in")

head -n 3 start.sh | cat -A shows:

#!/bin/sh^M
^M
# Default to stdio transport if not specified^M

Expected

Container starts and start.sh runs normally.

Proposed

Fix Add a .gitattributes entry at the repo root to enforce LF for shell scripts:
*.sh text eol=lf

Verification

After adding the above .gitattributes entry and rebuilding, the container starts successfully and start.sh executes without errors on Windows (WSL).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions