I’m an experienced Syncthing user trying to set it up in Docker for the first time. I would appreciate a bit of help understanding how volume mapping works.
I’m installing on a Synology NAS on which I’ve been running the SynoCommunity package for years. I want to move to Docker.
Let’s say I have a directory on the NAS at /volume1/some-folder that I want the Docker-based instance to be able to sync. If I map as:
# first mapping for config
/volume1/docker/syncthing:/var/syncthing
/volume1/some-folder:/var/syncthing/some-folder
Syncthing will create a “some-folder” directory on my NAS host at /volume1/docker/some-folder.
That’s obviously not what I want. Is this behavior specific to the /var/syncthing directory and is Syncthing trying to do me a favor by making this content available on the host?
I’m wondering if solving this is as simple as mapping the folder I want to be visible to Syncthing to anything other than /var/syncthing such as:
# first mapping for config
/volume1/docker/syncthing:/var/syncthing
/volume1/some-folder:/var/syncthing-folders/some-folder
In the sample config above, Docker binds /volume1/docker/syncthing to /var/syncthing, then because the second volume mapping requires the mount point /var/syncthing/some-folder for /volume1/some-folder, it ends up creating the subdirectory /volume1/docker/syncthing/some-folder.
A mount point below another mount point is okay, but the order the mounts happen is important.
And thanks for Syncthing - it’s such an outstanding piece of software. I’ve expressed my gratitude with contributions in the past, and I’ll do so again, but this is as good an opportunity as any to say “Thanks!”.