-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Hi.
Currently, running the container as an arbitrary user is pretty complicated, involving mounting a customized /etc/passwd and bindmounting any volume the postgres user might need to access so that permissions can be made to match(e.g. /var/run/postgresql must use a bindmount with the right permissions for the arbitrary user).
It would be nice if the entrypoint of the image could make this easier. For example, by passing POSTGRESQL_USER_ID and POSTGRESQL_GROUP_ID environment variables, the entrypoint could take care of changing the postgres uid and gid(using usermod) and changing permissions of relevant directories. This would help reduce deployment complexity for those who require that the container be run with a specific user(e.g. to make data bindmounts accessible on the host).
Thanks!