YETUS-469 Allow running docker as root. Made the error for user/group permissions to be non fatal. The error will still be seen on the console. However, it wont be fatal.
Signed-off-by: Sean Busbey <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/74d9f02c Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/74d9f02c Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/74d9f02c Branch: refs/heads/YETUS-468 Commit: 74d9f02cb8e583ec3629e1a267cd549bd6d1da15 Parents: d7e9543 Author: sacharya <[email protected]> Authored: Sat Nov 19 16:43:48 2016 -0600 Committer: Ajay Yadava <[email protected]> Committed: Mon Dec 5 12:34:05 2016 -0500 ---------------------------------------------------------------------- precommit/core.d/docker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/74d9f02c/precommit/core.d/docker.sh ---------------------------------------------------------------------- diff --git a/precommit/core.d/docker.sh b/precommit/core.d/docker.sh index 2dae49d..e933883 100755 --- a/precommit/core.d/docker.sh +++ b/precommit/core.d/docker.sh @@ -552,9 +552,9 @@ FROM ${baseimagename} LABEL org.apache.yetus="" LABEL org.apache.yetus.testpatch.patch="tp-${DOCKER_ID}" LABEL org.apache.yetus.testpatch.project=${PROJECT_NAME} -RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME} -RUN useradd -g ${GROUP_ID} -u ${USER_ID} -m ${USER_NAME} -RUN chown -R ${USER_NAME} /home/${USER_NAME} +RUN groupadd --non-unique -g ${GROUP_ID} ${USER_NAME} || true +RUN useradd -g ${GROUP_ID} -u ${USER_ID} -m ${USER_NAME} || true +RUN chown -R ${USER_NAME} /home/${USER_NAME} || true ENV HOME /home/${USER_NAME} USER ${USER_NAME} PatchSpecificDocker
