Open goose-ws opened 3 years ago
I think this is related to #2 will get that sorted out soon, keep you posted.
I tried doing that but had issues with permissions when trying to execute the scripts, I don't have that much experience with UNIX permissions or Docker for that matter. Wish I could do it right, if you know what to tweak just send me a PR and I will check it out!. In the meantime I fixed a permission's issue by chmoding on every run, yikes ugly but works.
Yeah, it's related to #2
Essentially you'll want to follow this logic:
If a PUID environment variable is set, then create a user with the same UID (Or modify an existing user's UID to be the same):
Then, chown the /drive
directory to that user.
Then, in your entrypoint.sh
script, modify the runGrive()
so that they are run as that user. (So instead of line 6 being grive ${PARAMS}
you would do su -u "${user}" -s "/bin/bash" -c "grive ${PARAMS}"
Inside the container, this will execute the grive
command as ${USER}
. The username doesn't actually matter, on Unix, the UID is what matters. If the UID inside the container matches the UID of the desired user on the host, then those files will be owned by the UID (and therefore, the desired user) on the host.
You'd also want to modify your line 9 in your run.sh
script.
I don't have time to bang out a PR right now, but if you're unable to, I'll write one up..eventually
I'd appreciate being able to set the UID/GID that I want Grive to run as