x11docker icon indicating copy to clipboard operation
x11docker copied to clipboard

Add new docker user to group

Open jcalfee opened this issue 2 years ago • 1 comments

I have a few containers that like to use user / group ID 1001 instead of the more standard 1000, however, I also mostly use 1000 at the same time. Can you recommend a good way to add the new internal x11 docker user (1000) to group (1001) upon container start? I do not need sudo or root other than this one user modification.

This would be similar to adding RUN usermod -a -G 1001 username to the Dockerfile, however, I can't do this because the user does not exist yet (it is created by x11docker later).

thank you... :pray:

jcalfee avatar Mar 25 '23 21:03 jcalfee

You could try option --runasroot 'command'. I am not sure yet if the command is executed before or after the setup of /etc/passwd.

mviereck avatar Apr 10 '23 07:04 mviereck