-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
docker-pipeline-plugin:1.15
Jenkins 2.105 in docker container
When launching the docker agent, the following option is always added to the command line.
-u 1000:1000
It can be problematic if we want to use a specifically configured user inside the docker container agent, since adding a -u option in the args results in an unexpected command.
It would be very useful to have an option to specify the user mapping inside the container.
- is duplicated by
-
JENKINS-54408 docker exec runs as root within docker.image.inside which docker run runs as the jenkins user
-
- Open
-
Seeing something similar:
This:
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 ... - The job will fail when writing inside /var/jenkins_home/jobs/test/workspace...