docker-compose up giving file not found error

20.6k Views Asked by At

I am using vagrant. when i do git bash in the folder which already contain docker-compose.yml file. but when i execute command docker-compose up then that gives me error like

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

        Supported filenames: docker-compose.yml, docker-compose.yaml

steps i did : 1. went in folder which contain vagrant and docker-compose.yml file 2. right click and clicked on git bash here 3. give command in git bash as vagrant ssh 4. then give command as docker-compose up

2

There are 2 best solutions below

3
khaled hadjali On

point to the directory where ur yml file are . in the yml file u have build line check it . it that line u put the path of ur DockerFile . and apply the command docker-compose up in the path of ur yml file .

2
vilma On

It could be that the docker service is down. You can check that with:

sudo systemctl status docker.service

If it's down you can use the following command to restart it.

sudo systemctl restart docker.service