简体   繁体   English

Docker-撰写引发错误

[英]Docker-compose throwing error

Hello guys I'm trying to get my vagrant up but the docker keeps on throwing an error which is given below : 嗨,大家好,我正在尝试让我的工作人员流浪汉,但码头工人不断抛出错误,如下所示:

Can't find a suitable configuration file in this directory or any parent. Are you in the right directory

The file is present at the root of my project. 该文件位于我的项目的根目录。 It was all working well but it just started to throw an error. 一切运行良好,但刚开始引发错误。 Can somebody tell me what is it that I have done due to which I'm getting this error 有人可以告诉我由于这个错误我做了什么。

Run: 跑:

docker-compose -f rootoftheprojectpath/docker-compose.yml up -d

Check read permissions, typos, etc. Also check that your file is not empty 检查读取权限,错别字等。还要检查文件是否为空

Regards 问候

well, I had this error but it was due to vagrant. 好吧,我有这个错误,但这是由于无所事事。 If you are running vagrant then first of all enter into your vagrant machine using : 如果您正在运行无业游民,则首先使用以下命令进入无业游民的计算机:

vagrant ssh command

and try to find the file over there. 并尝试在那找到文件。 If you don't have it over there then this is the problem. 如果那边没有,那就是问题所在。 That file is not being loaded over here because of which you are getting this error. 由于该错误,因此该文件未在此处加载。

My error was coming because vagrant was not mounting the nfs partition because of which the whole project was not loading in the vagrant machine and after that, the docker command was being run. 我的错误即将来临,因为流浪汉没有挂载nfs分区,因此整个项目都没有加载到流浪汉机器中,此后,正在运行docker命令。 Since the project was not being loaded docker command was not able to find the required file. 由于未加载项目,所以docker命令无法找到所需的文件。

If this is your problem try to mount your nfs partition first. 如果这是您的问题,请尝试先挂载nfs分区。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM