Newbie! Simple problem

I am playing with the trainsign application to learn more about Balena. I followed all the instructions and have my Raspberry Pi running the app.

However, the container can’t find the shell script to start.

main /bin/sh: 1: ./ not found

It just keeps showing this error repeatedly. I can’t ssh into the MAIN app, the said the container is restarting.

How can I troubleshoot this?


I’d first try setting an absolute path to your file. Assuming this is the repo you’re playing with the absolute file path would be /usr/app/

Another option is specifically invoking bash at the end of your dockerfile with CMD ["bash", "/usr/app/"]

Hopefully one of those will get you on the right path.

That was great info. That definitely fixed that problem. Thanks!

Now, I am getting syntax errors in the script.
02.09.19 07:38:11 (-0400) main /usr/app/ line 2: $‘\r’: command not found
02.09.19 07:38:11 (-0400) main /usr/app/ line 15: syntax error: unexpected end of file

I will keep working on it. This definitely gets me closer!


So, for some reason, when I push the app, it is adding ^M to the end of each line of the file. This is causing syntax errors I believe. I am sure this is some kind of windows translation issue. I am going to to push from Linux and see if that works differently.


Hi Kurt, if you’re fighting with Line Endings in Git, then this page may be helpful.

So, I gave up on Windows and created a Debian 9 Virtualbox. Pushed the app from Linux and everything worked great. I will do everything in Linux from now on.

Hi Kurt,

Have you tried adjusting your git configuration to properly handle line endings? If so, let us know what additional problems you faced and we might be able to help further!