I create a docker-compose file in the /srv/postgresql as below.
xxx@xxxx:/srv/postgresql$ ls -all
total 16
drwxrwxr-x 3 xxx xxx 4096 Dec 15 04:03 .
drwxrwxrwx 5 root root 4096 Dec 15 04:08 ..
-rwxrwxrwx 1 xxx xxx 251 Dec 15 04:07 docker-compose.yml
drwxrwxr-x 2 xxx xxx 4096 Dec 15 03:48 postgres_data
But when I tried to run docker-compose up it says cannot find a suitable configuration file.
xxx@xxxx:/srv/postgresql$ docker-compose up
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
It actually works when I move my docker-compose.yml to "/home/xxx/". So I thought it might be some Linux file permission issues. Can anyone explain why it happens and how to solve it?