fix(docker): 强制 Dockerfile/shell 文件 LF 行尾,修复容器入口脚本启动失败
Dockerfile.trading 用 BuildKit heredoc 内嵌生成 rakuten-entrypoint.sh, Windows 签出(core.autocrlf)把 Dockerfile 转成 CRLF 后,heredoc 内容 继承 CR,shebang 变成 /bin/sh\r,容器启动报 "exec /usr/local/bin/rakuten-entrypoint.sh failed: No such file or directory" (实际是解释器 /bin/sh\r 不存在)。 - 新增 .gitattributes:Dockerfile*、*.sh、*.py、*.yaml、*.toml、*.json 强制 eol=lf,杜绝 Windows 签出再次转坏 - Dockerfile / Dockerfile.trading 工作区文件转回 LF
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# Windows 签出(core.autocrlf)会把文本文件转成 CRLF。
|
||||
# Dockerfile.trading 内嵌 heredoc 生成 shell 入口脚本,CRLF 会让 shebang
|
||||
# 变成 /bin/sh\r,容器启动报 "No such file or directory"。以下文件强制 LF:
|
||||
Dockerfile* text eol=lf
|
||||
*.sh text eol=lf
|
||||
*.py text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.yml text eol=lf
|
||||
*.toml text eol=lf
|
||||
*.json text eol=lf
|
||||
Reference in New Issue
Block a user