Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dannykellett opened this issue May 3, 2024 · 1 comment

Comments

@dannykellett
Copy link

dannykellett commented May 3, 2024

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
Copy link
Author

I found the fix
Open the nginx/docket-entrypoint.sh in notepad++
Menu Edit > EOL > Unix LF
Save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant