GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-library/pull/159
Jenkins docker: use non-root user
Implementing part of the advice from infra in
https://issues.apache.org/jira/browse/INFRA-16417
---
They advised we use `-u 910:910`, rather than the mvn command running as
root in the container.
Note that running the docker build on my local (mac) laptop, the user ids
are interesting! In the container, (which use bind mounts for `.m2` and and the
workspace) are owned by root:root. However, on my laptop, the files created are
still owned by my own user.
Magic?! I'm therefore not sure whether this change will make much
difference.
---
The other big change we need (not done here - I'll look at that next),
recommended in INFRA-16417, is to STOP bind mounting .m2. They said: "Please
don't use a bind mount for filesystems you intend to write to".
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-library fix-jenkins-build
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-library/pull/159.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #159
----
commit 5a9fc95a99cd7b21fe2de9707e4a3286a358635f
Author: Aled Sage <aled.sage@...>
Date: 2018-09-24T12:32:07Z
Jenkins docker: use non-root user
----
---