简体   繁体   中英

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. Since the project was not being loaded docker command was not able to find the required file.

If this is your problem try to mount your nfs partition first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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