#!/bin/bash
# Generates cert.pem and key.pem using existing Syncthing image
docker run --rm -v $(pwd):/mnt syncthing /syncthing -generate=/mnt
rm ./config.xml

#!/bin/bash
# Generates cert.pem and key.pem using existing Syncthing image
docker run --user root --rm -v $(pwd):/mnt syncthing /syncthing -generate=/mnt
chmod 644 *.pem
rm ./config.xml

Correct permissions for generated cert.pem and key.pem
Correct permissions for generated cert.pem and key.pem
