2

I just cloned a git-repository (https://github.com/mailcow/mailcow-dockerized) and wanted to pull the docker images with

docker-compose pull

but docker-compose can't find the docker-compose.yml.

Here's the directory listing and docker-compose output:

root@xxx:/opt/mailcow-dockerized# ll
total 132
drwxr-xr-x 6 root root  4096 Jun  1 12:52 ./
drwxr-xr-x 4 root root  4096 Jun  1 12:48 ../
-rw-r--r-- 1 root root  3223 Jun  1 12:48 CODE_OF_CONDUCT.md
-rw-r--r-- 1 root root   954 Jun  1 12:48 CONTRIBUTING.md
drwxr-xr-x 6 root root  4096 Jun  1 12:48 data/
-rw-r--r-- 1 root root 15111 Jun  1 12:48 docker-compose.yml
lrwxrwxrwx 1 root root    12 Jun  1 12:48 .env -> mailcow.conf
-rwxr-xr-x 1 root root  7275 Jun  1 12:48 generate_config.sh*
drwxr-xr-x 8 root root  4096 Jun  1 12:48 .git/
drwxr-xr-x 3 root root  4096 Jun  1 12:48 .github/
-rw-r--r-- 1 root root   970 Jun  1 12:48 .gitignore
drwxr-xr-x 2 root root  4096 Jun  1 12:48 helper-scripts/
-rw-r--r-- 1 root root 35141 Jun  1 12:48 LICENSE
-rw------- 1 root root  4132 Jun  1 12:52 mailcow.conf
-rw-r--r-- 1 root root   992 Jun  1 12:48 README.md
-rw-r--r-- 1 root root  1746 Jun  1 12:48 .travis.yml
-rwxr-xr-x 1 root root 16845 Jun  1 12:48 update.sh*

root@xxx:/opt/mailcow-dockerized# docker-compose pull
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

I think I am missing something really obvious ...

3
  • I copied the folder to /root and tried it again and now its working ..
    – c-yco
    Jun 1, 2019 at 14:59
  • Same issue! I remounted my data to the home folder (also /root) and it worked. Do you know why this behaves this way? It's seems strange that containers have to be in a home folder to use docker compose.
    – jpaugh
    Feb 19, 2021 at 0:39
  • I did not test it, but as far as I know, docker runs using the user and group "docker". If you try finding the docker-compose.yml outside of a home directory the docker daemon cant find the file, cause the owner is set to root. If you copy it to your home directory and (as a standard) your user is in group docker it will run, because you have sufficient permissions. so its no docker issue, but a file permission issue.
    – D M
    Oct 19, 2021 at 7:01

0

Browse other questions tagged or ask your own question.