Phantom config folder with docker

I’m using docker and Syncthing is working just fine with a separated config folder located at /home/user/docker/syncthing

however, (presumably since i am binding syncthing data to my home dir) the container creates an EMPTY (and unused) config folder in my home directory: /home/user/config (owned by root unless create manually)

this is from the docker compose file

    volumes:
      - /home/user:/var/syncthing
      - /home/user/docker/syncthing:/var/syncthing/config

is there any way to avoid the ‘phantom’ config folder in my home, while still bind mounting to my home folder?

I suspect this is a natural consequence of mounting things. When you mount a filesystem somewhere, bind or otherwise, the mount point must exist as a directory. You’re mounting /home/user/docker/syncthing into /var/syncthing/config, so /var/syncthing/config must exist. In turn, /var/syncthing is mounted from /home/user, so /var/syncthing/config becomes /home/user/config.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.