Skip to content

Your lightweight open-source personal agent.

fix(docker): strip Windows CRLF from entrypoint.sh

flobo367e6f8cc7a68
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..9da244d8c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Ensure shell scripts always use LF line endings (Docker/Linux compat)
+*.sh text eol=lf
diff --git a/Dockerfile b/Dockerfile
index 45fea1f6f..3b86d61b6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -38,7 +38,7 @@ RUN useradd -m -u 1000 -s /bin/bash nanobot && \
chown -R nanobot:nanobot /home/nanobot /app
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
-RUN chmod +x /usr/local/bin/entrypoint.sh
+RUN sed -i 's/\r$//' /usr/local/bin/entrypoint.sh && chmod +x /usr/local/bin/entrypoint.sh
USER nanobot
ENV HOME=/home/nanobot