From e225a84f3b49ca115107fa92f660ae57c2312e52 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 11:21:24 +0000 Subject: [PATCH] fix: convert entrypoint.sh line endings at Docker build time - Add sed command in Dockerfile to strip CRLF line endings from entrypoint.sh - Add .gitattributes to enforce LF line endings for shell scripts - Fixes issue #7 where Docker container fails to start on Windows 11 This fix works immediately without requiring users to re-clone the repository. The sed command ensures correct line endings inside the container regardless of how the file was checked out on the host system. Co-authored-by: curlysasha --- .gitattributes | 5 +++++ Dockerfile | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0733591 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Ensure shell scripts always use LF line endings on all platforms +*.sh text eol=lf + +# Ensure other text files maintain consistent line endings +* text=auto diff --git a/Dockerfile b/Dockerfile index 46b299b..e1b0b24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,7 @@ COPY --from=backend /usr/local/bin /usr/local/bin EXPOSE 80 COPY entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh +# Convert line endings to LF (fixes Windows CRLF issues) and make executable +RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]