docker-compose cannot find the yaml file

Viewed 46

I've placed a docker compose file project.yaml at the location /etc/project/project.yaml

the file and well as the project directory have the same file permission, i.e. -rxwrxxrwx but when I run docker-compose

sudo docker-compose -f ./project.yaml up -d

if errors out with the following Cannot find the file ./project.yaml

I have checked various times and it seems there is no permission issue. Can anyone tell why we have this problem and what would be the solution

1 Answers

Beside using the full path, as commented by quoc9x, double-check your current working directory when you call a command with a relative path ./project.yaml

If you are not in the right folder, that would explain the error message.

Related