Trying to run Docker resulted in exit code 127

Lakshmi Narayanan

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, called vmx. The information about the application is here.

Your help is much appreciated.


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.

Collected from the Internet

Please contact javaer1[email protected] to delete if infringement.

edited at


Login to comment


run java code on docker

Make Error 127 when running trying to compile code

Eclipse exits automatically exit code 127

Running Python from CLion gives "Processed finished with exit code 127"

Docker compose containers fail and exit with code 127 missing /bin/env bash

Docker stalls on run - Wait Condition Exit

exit code 127 and ': No such file or directory`

Exit Code 125 from Docker when Trying to Run Container Programmatically

Trying to run archlinux image of docker-compose but its just exits with code 0

Laravel Task schedule with python script "Exit Code: 127(Command not found)"

docker's service exit with code 'Exit 127' : The system cannot find the path specified

CLion says 'Process finished with exit code 127'

Docker: Error code 127 when executing shell script

Trying to port application to docker nanoserver container. Running exe fails with exit code -1073741515 (Dependency missing)

Docker run returning exit code 100 or 51

I am trying to return a nonzero exit code on an Xcode Run Script build phase, but it's not working

Exit code 127 in cygwin64

command || run code and exit

Run a process, capture its output and exit code

Eclipse JVM Exit Code 127 when RTC 'Jazz Administration' perspective was opened

Systemd start script fails with exit code 127

Docker exits with a exit code on starting

dpkg: error exit status 127

Trying to run a function in a game loop, and then exit that function and run a separate function

CircleCI 2.0 - exit code 127, bundle command not found

AWS Code Pipeline Error: Script at specified location: scripts/install_dependencies run as user oracle failed with exit code 127

Centos docker-compose is showing exit code 0 but still it doesn't run

Errors form my k8s CornJob: Pod errors: Error with exit code 127

why Spring tool suite IDE shows error message as "JVM terminated. Exit code=127"