Closed dionysiusmarquis closed 6 years ago
Workaround:
You can set git / uid (docker --user uid:gid) but you have to set volume for the /mnt/sync from the host (create it with the correct permissions)
@DBLaci What do you mean "set volume for the /mnt/sync from the host"? If I have a folder that is owned by my uid/gid with rw permissions is that good enough?
Yes of course. I have to admit I can't remember why I write that part... :) The workaround is for forcing the user at container level. I think implementing the env variables to set the process userid/groupid would be better solution.
@DBLaci --user
is not a workaround, this is proper way to run the app inside a container as a specific user by specifying UID and GUID
I'm using this Docker image on my Synology NAS, which comes with a web interface to configure Docker containers. I have set the PGID
and PUID
environment variables using the web interface, but Resilio still runs as root
. From the Synology Docker web interface I see no way to run with --user uid:gid
. Therefore I think it would be great if the image would take these environment variables into account. Or is there another supported way to specify the user that's compatible with Docker on Synology NAS?
By using Docker compose I was able to run Resilio Sync under a specific user (with uid
and gid
), while also integrating with the Synology Docker GUI.
Here's an incomplete example of my Docker compose yml
file.
version: '2'
# Define services
services:
resilio-sync:
image: resilio/sync
container_name: resilio
volumes:
- /path/to/resilio/folder/on/host:/mnt/sync
restart: always
user: "2000:100"
environment:
- TZ=Europe/Amsterdam
Hey,
currently Resilio Sync Docker always runs as root and creating new synced folders with
root
permissions. Is it possible to run the container with specificUID
? AddingUID
andGID
That would help to read out the folders from another Docker container.