Dockerfile for Syncthing

In case any of you are interested, here is a Dockerfile for syncthing. Instructions are in the README. Make sure you follow the instructions about modifying config.xml to remove the 127.0.0.1 from the gui address line or you won’t be able to access the web ui from outside the container.

Scott

1 Like

Cool. I haven’t looked closer at your setup, but note that you can in fact pre-generate a config file and ship it without node ID:s in it. Syncthing will add it’s own node ID to the relevant places after it’s generated keys etc. Perhaps this could be useful to avoid having to hand edit the config file after deploy.

1 Like

Yeah, I might give that a try…although since I’m not actually doing mass deployments, I might not :smile: To do that just takes one more script to run before the container is run for the first time “for real” that mounts the /config volume and adds the pre-generated config file into the volume. Or you can just have the script mount the /config volume and then run syncthing and ‘sed -i /config/config.xml’ the auto-generated config file. The advantage to this is that you don’t have to maintain a local copy of the config file, which could potentially change as the project evolves.

Scott

1 Like