Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to run Docker resulted in exit code 127

I am trying to run a certain application in windows that uses docker. Since the application is a shell script, I use the cygwin terminal. As am new to docker, I dont have a clear Idea as to how it works.

Using boot2docker, I have a docker terminal open in windows 7 and a cygwin terminal to run the script.

But when I run the script, say

   ./xyz init

I get the following error

    trying to run docker resulted in exit code 127

Can you please tell me what are the basic first aid I should go through to resolve this?

The application is obtained from vision.ai, called vmx. The information about the application is here.

https://docs.vision.ai/

Your help is much appreciated.

like image 721
Lakshmi Narayanan Avatar asked Jan 07 '15 13:01

Lakshmi Narayanan


1 Answers

I got almost the same issue, the problem was simply in windows ending in that file, it was using CRLF instead of LF, change it to LF and it might work (using Notepad++, IntelliJ or Visual Code), referring to these answers:

env: bash\r: No such file or directory

How do I set all files in a subdirectory to use a specific eol using gitattributes?

So my .gitattributes file now is like this:

* text=auto
/docker/* text eol=lf
/ci/* text eol=lf
/sbt text eol=lf
/docker-*.sh text eol=lf
/sbt-dist/bin/*.bash text eol=lf
/sbt-dist/bin/sbt text eol=lf

These attributes because I have play framework project deployed in docker.

like image 90
Al-Mothafar Avatar answered Nov 16 '22 02:11

Al-Mothafar