From 2ceb26599dae0eca9201caa4c175d4a187a5f265 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Thu, 19 Mar 2020 10:52:14 +0100 Subject: [PATCH] docker: Keep LF on bash configs for Windows builds Fixes an issue when building on Windows where the bash configs (`docker/etc/skel`) were checked out with `\r\n` file endings, then included with `COPY` during docker build. Causing an error when running the container: ```bash bash: $'\r': command not found bash: /home/pi/.bashrc: line 6: syntax error near unexpected token `$'in\r'' 'ash: /home/pi/.bashrc: line 6: `case $- in ``` Everything in the docker/rpi folder should be treated as Linux files. --- docker/rpi/.gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docker/rpi/.gitattributes diff --git a/docker/rpi/.gitattributes b/docker/rpi/.gitattributes new file mode 100644 index 0000000..a2a5874 --- /dev/null +++ b/docker/rpi/.gitattributes @@ -0,0 +1,2 @@ +# All files in this folder are taken from a Raspberry Pi so they should always use Linux file endings +* text eol=lf