Skip to content

Makes GID, UID and user as variables #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spassignat opened this issue Apr 10, 2023 · 1 comment
Closed

Makes GID, UID and user as variables #1068

spassignat opened this issue Apr 10, 2023 · 1 comment

Comments

@spassignat
Copy link

Hello,

the fixed values 999 for GID and UID and the user name postgres, are not always convenient when using docker-compose with several applications sharing the same host folder for their volumes.

Is it possible to make them variables ? defaulting their values ?

thanks

@yosifkit
Copy link
Member

Just set --user/user: to whatever uid/gid that you desire and provide a directory owned by that user for the volume (/var/lib/postgresql/data). No variable is necessary, the images are designed to run as any arbitrary user.

https://github.com/docker-library/docs/tree/c235cf87aee09b932b83b6486010571752e80ec1/postgres#arbitrary---user-notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants