Set custom UID and GID in docker #523
Replies: 4 comments 4 replies
-
If you're changing the user an existing install runs as, you'll likely need to go through and change the permissions on all the files so that the new user has access to them. That's likely what caused the issue when changing the user in Docker directly. |
Beta Was this translation helpful? Give feedback.
-
tried with a clean new volume... |
Beta Was this translation helpful? Give feedback.
-
Setting a custom UID and GID works for me if I also mount a volume for /app/db in the container with e.g. |
Beta Was this translation helpful? Give feedback.
-
I was able to at least get the podsync process to run and create files under a custom uid by:
sh -c 'adduser -u 1000 -D podsync && adduser podsync users; su - podsync -c "/app/podsync --no-banner -c /app/config.toml"' |
Beta Was this translation helpful? Give feedback.
-
Is it possible to set a different UID and GID in docker compose?
If I add the command
user: $(id -u):$(id -g)
with a UID not belonging to a root user Podsync cannot access to the file.Thanks
Beta Was this translation helpful? Give feedback.
All reactions