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

{BUG} /usr/bin/env: 'bash\r': No such file or directory #8

Closed
alber-khan opened this issue Feb 8, 2022 · 11 comments
Closed

{BUG} /usr/bin/env: 'bash\r': No such file or directory #8

alber-khan opened this issue Feb 8, 2022 · 11 comments

Comments

@alber-khan
Copy link

After building the docker image and running it.
docker run -p 8000:9000 --rm panja:latest
it's giving an error
/usr/bin/env: 'bash\r': No such file or directory

image

@alber-khan
Copy link
Author

As mentioned on another thread #4
I've updated ENTRYPOINT

CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.app.conf"]
image

and it worked!
but for some reason. it's giving a new error

image

`In StreamHandler.php line 216:

There is no existing directory at "/www/wwwroot/newpanja.test/storage/logs"
and it could not be created: Permission denied`

@alber-khan
Copy link
Author

but the file does exist inside docker.

image

@smortexa
Copy link
Member

smortexa commented Feb 8, 2022

Please run ls -la in storage/logs and send the output.

@alber-khan
Copy link
Author

image

@smortexa
Copy link
Member

smortexa commented Feb 8, 2022

The /usr/bin/env: 'bash\r': No such file or directory is about OS line endings. You should remove \r chars. If you are using VSCode, open the entrypoint.sh and all other bash files and change the end of line sequence to LF and rebuild the image.

eTlq9JHwiT

@alber-khan
Copy link
Author

Thank you @smortexa that does fix the issue.

image

do you know why storage/logs it's taking the local directory of my server in instead of /var/www/html

@smortexa
Copy link
Member

smortexa commented Feb 8, 2022

Did you change the WORKDIR in the Dockefile?

@alber-khan
Copy link
Author

image
image

Nope

@alber-khan
Copy link
Author

Sorry I missed Change directory to your Laravel project

lemme try to rebuild the image again!

@alber-khan
Copy link
Author

Thank you @smortexa it works.

i think it's best if we can pass WORKDIR via --build-arg what do you think?

@smortexa
Copy link
Member

smortexa commented Feb 8, 2022

IMO, It's OK what is it.

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

2 participants