I have the following
I'm build a Jenkins container as follows:
docker build -t my-jenkins --build-arg uid=1003 --build-arg gid=1003 .
I then run the image as follows:
docker run -it -p 8080:8080 my-jenkins
I go to
localhost:8080 and finish installation (without any plugins selected).
I then create a job with a single shell command:
I run the job and I expect the output of the job to be
+ id uid=1003(jenkins) gid=1003(jenkins) groups=1003(jenkins)
The output however, is
+ id uid=1000(jenkins) gid=1000(jenkins) groups=1000(jenkins)
which seems to indicate that my
gid are completely ignored.
Why is this? The Jenkins Dockerfile should accept uid/gid as guild args.