Closed roastlechon closed 2 years ago
Hi,
Just to be sure I am understanding what you are asking for:
1) The script does not need to be run as root to work, so I am assuming you are asking for the user inside the docker container to not be root? and more specifically to run them as a user of your choice?
2) Again because the directory that rclone looks for its config falls outside of the scope of what this script does, I assume you are asking about the ability to change where rclone looks for the config file inside the container? Rclone uses the env variable RCLONE_CONFIG
, so setting that should suffice for this.
That is correct, ideally follow pattern where could specify user/group https://docs.linuxserver.io/general/understanding-puid-and-pgid
Ah okay, I didnt know that theres an env variable for where to look for the rclone.conf file.
Can you check the Dockerfile
in the docker_user
branch? The only problem I have with this is that it will be a breaking change for anyone who already setup the old container since the config file location has changed.
I believe the dockerfile changes you have would mean that you need to compile the docker image when you want to use a new puid or pguid.
See these as examples for how linuxserver images work https://github.com/linuxserver/docker-pyload-ng/blob/main/Dockerfile which uses https://github.com/linuxserver/docker-baseimage-alpine/blob/master/Dockerfile as a base image, which has init processes for adduser https://github.com/linuxserver/docker-baseimage-alpine/tree/master/root/etc/cont-init.d
In regards to backwards compatibility, I think having a separate version or migration steps can work, or you could default to the original rclone conf path as a default
You are totally right, looks like I will need to adopt a more complex container in order to implement such a feature
If you would like I can try and tackle the issue and submit a PR!
That would be awesome!
I've taken a crack at it moving to the S6 init system like the linuxserver containers. I also took the opportunity to add some default settings for rclone. Your feedback would be appreciated
i was going to suggest using their base image and building on top of it, that way you dont have to maintain those scripts
Check out my #23 PR and let me know what you think
Description
I have this running on k3s, but had to set some additional parameters to not run as root, set a specific user, etc.
Ideally would be nice to change which directory to mount the
rclone.conf
file from with appropriate permissions, and rununif-protect-backup
andrclone
as a specific user.What I Did
Currently I am mounting volume at
/.config
since that was the first place it looks for configuration. I am also running the container as non-root as well.