File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed
Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 1+ # 默认文本文件按 LF 存储
2+ * text =auto eol =lf
3+
4+ # 关键脚本/配置强制 LF
5+ * .sh text eol =lf
6+ Dockerfile text eol =lf
7+ * .yml text eol =lf
8+ * .yaml text eol =lf
9+ * .py text eol =lf
10+ * .md text eol =lf
11+
12+ # Windows 脚本
13+ * .bat text eol =crlf
14+ * .cmd text eol =crlf
Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ RUN pip install --no-cache-dir -r requirements.txt
2222# 复制项目代码
2323COPY . .
2424
25- # 确保脚本具有执行权限
26- RUN chmod +x scripts/sync_stars.py
27- RUN chmod +x docker-entrypoint.sh
25+ # 确保脚本具有执行权限,并消除可能的 CRLF 换行问题
26+ RUN chmod +x /app/scripts/sync_stars.py \
27+ && sed -i 's/\r $//' /app/docker-entrypoint.sh \
28+ && chmod +x /app/docker-entrypoint.sh
2829
2930# 暴露端口(虽然 sync 主要是后台脚本,但为了统一性声明)
3031# HTML 展示由单独的 Nginx 处理,这里不强制暴露端口
3132
32- ENTRYPOINT ["/app/docker-entrypoint.sh" ]
33+ ENTRYPOINT ["/bin/sh" , "/ app/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /bin/sh
22# docker-entrypoint.sh
33
44set -e
You can’t perform that action at this time.
0 commit comments