cookiecutter-fastapi-backend icon indicating copy to clipboard operation
cookiecutter-fastapi-backend copied to clipboard

Error when running for the first time - app-nginx-1 | /bin/ash: illegal option -

Open dannykellett opened this issue 9 months ago • 1 comments

FIXED: I will leave this here in case anyone else has this issue.

The problem is that Windows uses \r\n as an end of line, whereas unix only uses \n. So, inside my nginx\docker-entrypoint.sh file, there was a ^M character that led to the error /bin/ash: illegal option

Use a text editor such as Notepad++ at the Windows machine to convert Go to menu Edit -> EOL Conversion -> Unix (LF) Save, remove the image from docker desktop and start again. Once that is done, the docker build works correctly.

-- Hi Just followed the install. I'm on Windows 10 I have docker desktop running I ran make up for the first time and I get this:

app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 | /bin/ash: illegal option - app-nginx-1 exited with code 2

That's on repeat

The other containers run e.g. db, redis and backend Any help please

dannykellett avatar May 03 '24 08:05 dannykellett