Skip to content

Run command as a current user#2

Open
zezic wants to merge 1 commit into
cschol:masterfrom
zezic:patch-1
Open

Run command as a current user#2
zezic wants to merge 1 commit into
cschol:masterfrom
zezic:patch-1

Conversation

@zezic

@zezic zezic commented Oct 6, 2020

Copy link
Copy Markdown

Run command as a current user to avoid creating of build artifact files with the root privileges which then are not handy to remove/overwrite.

Run command as a current user to avoid creating of build artifact files with the root privileges which then are not handy to remove/overwrite.
@cschol

cschol commented Oct 6, 2020

Copy link
Copy Markdown
Owner

That only works if a user matching the current user exists in the Docker container.

@zezic

zezic commented Oct 6, 2020

Copy link
Copy Markdown
Author

The next thing works for me:

zezic@990FXA:~$ docker run --user 12345:12345 -it bash
bash-5.0$ echo $UID
12345
bash-5.0$ id -g
12345
bash-5.0$

As well as building plugins with --user argument manually adjusted to 12345:12345.

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

Successfully merging this pull request may close these issues.

2 participants