Skip to content

Commit e0a2ab6

Browse files
chore: add .gitattributes to enforce LF line endings for shell scripts and update Dockerfile to handle CRLF issues
1 parent f86f493 commit e0a2ab6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows checkouts must not use CRLF on shell scripts — breaks Linux shebang/exec
2+
# (symptom: exec /usr/local/bin/docker-entrypoint.sh: no such file or directory)
3+
*.sh text eol=lf

upload-api/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ RUN mkdir -p /app/build \
1515
&& chown -R nodeapp:nodeapp /app
1616

1717
COPY docker-entrypoint.sh /usr/local/bin/
18-
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
18+
RUN sed -i 's/\r$//' /usr/local/bin/docker-entrypoint.sh \
19+
&& chmod +x /usr/local/bin/docker-entrypoint.sh
1920

2021
USER nodeapp
2122

0 commit comments

Comments
 (0)