[JIRA] (JENKINS-49437) Impossible to specify user/uid to use inside container

4 views
Skip to first unread message

vxworxnl@gmail.com (JIRA)

unread,
Jul 3, 2019, 5:50:02 AM7/3/19
to jenkinsc...@googlegroups.com
Vi Pl commented on New Feature JENKINS-49437
 
Re: Impossible to specify user/uid to use inside container

Seeing something similar:

This:

 

docker.image(image).inside('-u 0:0') {
 sh "..."
}

Results in:

[Pipeline] withDockerContainer
Jenkins seems to be running inside container e50594031f5a4017ed56c0842e4b546c8e1559caaf5c68549aeb541da3d70142
$ docker run -t -d -u 1000:1000 -u 0:0 -w /var/jenkins_home/jobs/test/workspace --volumes-from e50594031f5a4017ed56c0842e4b546c8e1559caaf5c68549aeb541da3d70142 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** image:0.1

 

 

I do not expect -u 1000:1000 -u 0:0 ... It full files my needs, but it seems wrong

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

vxworxnl@gmail.com (JIRA)

unread,
Jul 3, 2019, 6:03:02 AM7/3/19
to jenkinsc...@googlegroups.com
Vi Pl edited a comment on New Feature JENKINS-49437
Seeing something similar:

This:

 
{code:java}

docker.image(image).inside('-u 0:0') {
sh "..."
}{code}
Results in:
{code:java}

[Pipeline] withDockerContainer
Jenkins seems to be running inside container e50594031f5a4017ed56c0842e4b546c8e1559caaf5c68549aeb541da3d70142
$ docker run -t -d -u 1000:1000 -u 0:0 -w /var/jenkins_home/jobs/test/workspace --volumes-from e50594031f5a4017ed56c0842e4b546c8e1559caaf5c68549aeb541da3d70142 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** image:0.1{code}
 

 

I do not expect {{-u 1000:1000 -u 0:0}} ...
- It full files my needs, but it seems wrong - The job will fail when writing inside /var/jenkins_home/jobs/test/workspace...

vxworxnl@gmail.com (JIRA)

unread,
Jul 3, 2019, 6:04:02 AM7/3/19
to jenkinsc...@googlegroups.com
Vi Pl edited a comment on New Feature JENKINS-49437
Seeing something similar:

This:

 
{code:java}
docker.image(image).inside('-u 0:0') {
sh "..."
}{code}
Results in:
{code:java}
[Pipeline] withDockerContainer
Jenkins seems to be running inside container e50594031f5a4017ed56c0842e4b546c8e1559caaf5c68549aeb541da3d70142
$ docker run -t -d -u 1000:1000 -u 0:0 -w /var/jenkins_home/jobs/test/workspace --volumes-from e50594031f5a4017ed56c0842e4b546c8e1559caaf5c68549aeb541da3d70142 -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** image:0.1{code}
 

 

I do not expect {{-u 1000:1000 -u 0:0}} ... - It full files my needs, but it seems wrong- The job will fail when writing inside /var/jenkins_home/jobs/test/workspace...
Reply all
Reply to author
Forward
0 new messages