Great script! Some small additions I had to make for my setup, maybe they could be useful for others too?
Added option to map id for borg user and group, in case they need to be mapped to specific id's on the host for access to resources. The user option provided by docker itself, doesn't always work as expected. This trick, also used in all the linuxserver.io containers, always works for me 👍
Added creation of group so we can explicitly set this id as well when needed
Add a validity check for the generated authorized_keys file, in case you add something weird to your BORG_SERVE_ARGS (I used " w/o escaping in my docker-compose, resulting in an invalid authorized_keys, which took a while to figure out 😋)
Great script! Some small additions I had to make for my setup, maybe they could be useful for others too?
user
option provided by docker itself, doesn't always work as expected. This trick, also used in all the linuxserver.io containers, always works for me 👍"
w/o escaping in my docker-compose, resulting in an invalid authorized_keys, which took a while to figure out 😋)