> > Well, then let it match. Or do you need it on the host? > > HTH... > > Dirk >
Thanks for the response, but I think I must be missing a trick because I don't know what you're getting at. If say, the uid of the host user is 1005, and the uid of the container's jenkins user is 1000, these clearly don't match. I would need to set the uid of the user in the container to 1005 in order to let it use the mounted keys, as in this PR https://github.com/jenkinsci/docker/pull/238/files ENTRYPOINT usermod -u $(stat -c "%u" /var/jenkins_home) jenkins && \+ gosu jenkins /bin/tini -- /usr/local/bin/jenkins.sh But this change was rejected for reasons that running a container as root is against best practises. Or am I misunderstanding and you're suggesting something else? Would it be possible to simply alter the uid of the Jenkins user without root & gosu? Or do you mean to only run the container as a user on host with uid 1000? On Wednesday, 4 January 2017 07:51:23 UTC, Dirk Heinrichs wrote: > > Am 03.01.2017 um 15:21 schrieb Barry Laffoy: > > Mounting the key location as volume with `docker run -v > /path/to/keys:/var/jenkins_home/.ssh` does not work, as the mount point in > the container inherits the uid/gid of the host directory, which does not > match the uid/gid of the "jenkins" user within the container. > > > Well, then let it match. Or do you need it on the host? > > HTH... > > Dirk > -- > *Dirk Heinrichs* > Senior Systems Engineer, Delivery Pipeline > OpenTextTM Discovery | Recommind > *Email*: [email protected] <javascript:> > *Website*: www.recommind.de > > Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach > > Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon > Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer HRB > 10646 > > This e-mail may contain confidential and/or privileged information. If you > are not the intended recipient (or have received this e-mail in error) > please notify the sender immediately and destroy this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this > e-mail is strictly forbidden > > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte > Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail > irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und > vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte > Weitergabe dieser Mail sind nicht gestattet. > > www.recommind.com > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/406bc806-129a-40e0-adda-064e35d69392%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
