testdrivenio / testdriven-app-2.4

23 stars 8 forks source link

Add Windows entrypoint.sh line ending note #15

Closed justinttl closed 5 years ago

justinttl commented 5 years ago

In Part 1/Postgres Setup:

Sanity check:

$ chmod +x services/users/entrypoint.sh
$ docker-compose up -d --build

I had a lot of trouble debugging why I received this error during docker compose up

users_1     | standard_init_linux.go:207: exec user process caused "no such file or directory"

Turns out, it had to do with Windows CRLF. The shebang with /bin/sh^M is not recognized by linux. Since the compose yml directly mounts windows folder and overwrite the COPY for development purposes, I suspect that docker might not have handled this properly, and we cannot simply run dos2unix in the Dockerfile.

Would be great if there is a note to advise windows developer to configure their IDE to have LF line endings!