smebberson / docker-alpine

Docker containers running Alpine Linux and s6 for process management. Solid, reliable containers.
MIT License
596 stars 186 forks source link

Replace CRLF with LF #14

Closed matthewvalimaki closed 8 years ago

matthewvalimaki commented 8 years ago

Many, if not all, files contain CRLF instead of LF. While not a huge deal shell scripts are picky about this and currently throw : No such file or directory sh which can be seen with user-consul-nginx-nodejs. This does not seem to affect operations but are a concern and can be fixed by simple conversion.

I recommend all files to be updated from CRLF to LF.

smebberson commented 8 years ago

@matthewvalimaki I was just looking into this because it's basic and fundamental. I thought I could squeeze it in but I can't seem to find any CRLF files in the repo. This is my output:

vagrant@ubuntu-14:/vagrant$ file ./examples/user-consul-nginx-nodejs/root/etc/services.d/nginx/run 
./examples/user-consul-nginx-nodejs/root/etc/services.d/nginx/run: a /usr/bin/with-contenv sh script, ASCII text executable

It doesn't mention CRLF like it I was expecting. Is this still an issue? Are you able to be a little more specific about the files you're seeing are CRLF?

smebberson commented 8 years ago

@matthewvalimaki, I ran this too find . -not -type d -exec file "{}" ";" | grep CRLF and got nothing back :(

The only thing I could find was:

docker-alpine$ find . -not -type d -exec file "{}" ";" | grep "no line terminators"
./examples/user-consul-nginx-nodejs/root/app/node_modules/node-static/test/fixtures/hello.txt: ASCII text, with no line terminators
./examples/user-nginx-nodejs/root/app/node_modules/node-static/test/fixtures/hello.txt: ASCII text, with no line terminators

Is that what you're talking about?

matthewvalimaki commented 8 years ago

@smebberson you know, I've built some of the images on Windows and it's during git clone when things get converted from LF to CRLF. Sorry about this report. I didn't realize it until you looked into it.