我试图在使用docker的Windows中运行某个应用程序。由于应用程序是shell脚本,我使用cygwin终端。作为码头工人的新手,我对它是如何工作没有明确的想法。
使用boot2docker,我在windows 7中打开了一个docker终端,并运行了一个cygwin终端来运行脚本。
但是当我运行脚本时,请说
./xyz init
我收到以下错误
trying to run docker resulted in exit code 127
你能否告诉我,我应该解决这个问题的基本急救措施是什么?
该应用程序从vision.ai获得,称为vmx。有关应用程序的信息在这里。
非常感谢您的帮助。
我得到了几乎相同的问题,问题只是在Windows中以该文件结尾,它使用CRLF
而不是LF
,将其更改为LF
并且它可能有效(使用Notepad ++,IntelliJ或Visual Code),指的是这些答案:
env: bash\r: No such file or directory
How do I set all files in a subdirectory to use a specific eol using gitattributes?
所以我的.gitattributes
文件现在是这样的:
* 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
这些属性因为我在docker中部署了play框架项目。
我认为127意味着在路径上没有找到docker。 Similar question。在Windows上,docker只能在boot2docker vm内部工作,所以如果你在cygwin中运行脚本,它将无法工作。你必须ssh进入boot2docker vm并在那里运行你的命令。
确保您的文件具有正确的行结尾。
例如,使用Vim打开文件并运行::set fileformat=unix
,然后保存文件并再次运行Docker。
我会说Docker不在你的PATH中。添加C:\ Program Files \ Docker \ Docker \ Resources \ bin或相应的