From 6ad015255d0f75ede2d9b35b2dd9d1cde0a73343 Mon Sep 17 00:00:00 2001 From: bluefishs <125471205+bluefishs@users.noreply.github.com> Date: Fri, 5 Jun 2026 07:54:01 +0800 Subject: [PATCH] chore: enforce LF line endings for container entrypoints (#12181) Windows contributors checking out on NTFS with git's default core.autocrlf will end up with CRLF in docker/entrypoint.sh. When COPY'd into the image and invoked as ENTRYPOINT, the kernel interprets the trailing \r as part of the interpreter path, producing a confusing 'no such file or directory' despite the file being present and executable. Lock LF for the usual suspects (*.sh, Dockerfile, *.dockerfile, and the specific docker/entrypoint.sh). The existing tree is already LF; this is preventive against future Windows regressions only. --- .gitattributes | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitattributes b/.gitattributes index 872621689..553e3cd21 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,10 @@ # Auto-generated files — collapse diffs and exclude from language stats web/package-lock.json linguist-generated=true + +# Enforce LF for scripts that run inside Linux containers. +# Without this, Windows checkout converts to CRLF and breaks `exec` in the +# container entrypoint with "no such file or directory". +*.sh text eol=lf +Dockerfile text eol=lf +*.dockerfile text eol=lf +docker/entrypoint.sh text eol=lf