-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Ability to change username inside the docker container? #881
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
Comments
You could replace the entrypoint in your image with a script that changes the username to something stored in an env variable. Something like the following should work (untested):
This won't change the home directory from |
@loganto @deansheather It's a bit late but here's the script I'm using (allows configuring
This really should be baked in by default. |
Not sure why you need all that, just use:
For example to set it the username to |
And you can already adjust the uid/gid you run the image as and the image will automatically change the |
You have a good point, but I would like this to be merged into the |
Let's add a environment variable to configure it! |
@nhooyr Any progress on this? Or am I expected to submit a PR...? |
I'll take care of it soon. |
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Needs to be reflected in the documentation and the dockerhub description now. Closes #881
Hi. it would be nice to be able to pass in the username and uid|gid as environmental variables when launching container.
So we dont have to use a name
coder
and use something specific to the user.The text was updated successfully, but these errors were encountered: