Closed FSund closed 2 years ago
x11docker has an option --user
:
--user=N Create container user N (N=name or N=uid). Default:
same as host user. N can also be an unknown user id.
You can specify a group id with N being 'user:gid'.
Special case: --user=RETAIN keeps image user settings.
So you can specify another host user to appear in container, or the one declared in image with USER
if you use --user=RETAIN
.
Note: With --user=RETAIN --sudouser
x11docker does not add the user to group sudo
because it does no user setup at all. It just allows to access those privileges instead of (default) denying them. su
would work.
Nice, thanks! I didn't realize that's what --user=RETAIN
did.
Is there any way to specify the username for the user when using the
--sudouser
option, or perhaps use theUSER
specified in the image?