Docker-compose local directory mappings are ignored, docker volumes are used instead

Hello,

The container is ignoring your bind mount and creates a docker volume instead because the target inside the container is wrong (see documentation).

The target within the container is /mnt/data while you try to manually bind mount to directories that are not used in the container setup. You just need a single bind mount to /mnt/data e.g. /mnt/volume-nbg1-1/owncloud/data:/mnt/data as the container is configured to place all relevant files there:

❯ docker exec -it dbb7f401ce8e ls -l /mnt/data
total 0
drwxr-xr-x. 2 www-data root   6 Apr 27 06:58 apps
drwxr-xr-x. 2 www-data root  82 Apr 27 06:58 config
drwxrwx---. 4 www-data root 132 Apr 27 07:00 files
drwxr-xr-x. 2 www-data root   6 Apr 27 06:58 sessions
1 Like