Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker env: bash\r: No such file or directory

While locally deploying an app in PyCharm on windows10, I have encountered several mistakes. Make test command returned following mistake:

service "core" is not running container #1 
make: *** [Makefile:60: test] Error 1

And indeed container status with the command make ps returned exited(127). When I have checked docker logs for the container in question, I've seen:

/usr/bin/env: ‘bash\r’: No such file or directory

In this thread, this mistake is connected to how windows processes line endings of files from different OS. The usual solution is:

git config --global core.autocrlf false

But after running the code and updating current git repo and restarting the containers, i still get the same mistake. What might be the issue here?

like image 600
Zechariah Lvov Avatar asked Oct 14 '25 19:10

Zechariah Lvov


1 Answers

When I use Windows in Docker and run a bash script, I have a similar problem, which I solve by using LF instead of CRLDF as the line separator.

in vscode, we can change it here enter image description here

like image 175
Fauzan Taufik Avatar answered Oct 17 '25 13:10

Fauzan Taufik