Skip to content
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

Run docker image as a given user (uid/gid) #1634

Closed
hereisderek opened this issue Nov 9, 2022 · 2 comments
Closed

Run docker image as a given user (uid/gid) #1634

hereisderek opened this issue Nov 9, 2022 · 2 comments
Labels
distribution Issue refers to target platform, e.g. Docker enhancement Improvement of existing feature request

Comments

@hereisderek
Copy link

Request details

is there a way to run the docker as a specific user (with given uid/gid) instead of the hard coded 999:999 ?

one of the common practices is to pass in as PUID and PGID environment variable

Thanks

@dzikoysk dzikoysk added question Questions about project and how to use it and removed triage labels Nov 9, 2022
@dzikoysk
Copy link
Owner

dzikoysk commented Nov 9, 2022

Not really, those two are hardcoded in Docker image file:

As far as I remember quite a lot of popular projects use this 999:999 combination, why would you want to change that?

@dzikoysk dzikoysk changed the title run the docker image as a given user (uid/gid) Run docker image as a given user (uid/gid) Nov 9, 2022
@dzikoysk dzikoysk added enhancement Improvement of existing feature request distribution Issue refers to target platform, e.g. Docker and removed question Questions about project and how to use it labels Nov 10, 2022
@dzikoysk
Copy link
Owner

I've used recommended by you variable names - PUID & PGID. The script will create user & group at the start of the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distribution Issue refers to target platform, e.g. Docker enhancement Improvement of existing feature request
Projects
None yet
Development

No branches or pull requests

2 participants