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.

Your help is much appreciated.

1

6 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.

3

I think the 127 means docker was not found on the path. Similar question. On windows docker will only work inside the boot2docker vm so if you are running the script in cygwin it would not work. You must ssh into the boot2docker vm and run your commands there.

1

Make sure your file has the correct line ending.

For example, open your file using Vim and run: :set fileformat=unix, then save the file and run Docker again.

I faced the same error while building in AWS CodeBuild. The issue was the sudo in the commands

In the buildspec.yml file, I had to change:

sudo docker build -t xxxx:xxxx 

to

docker build -t xxxx:xxxx 

I would say Docker is not in your PATH. Add C:\Program Files\Docker\Docker\Resources\bin or appropriate

here are some resources for bulk/recursive line ending conversion that can sometimes be the cause of this issue:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy