summaryrefslogtreecommitdiff
path: root/ci/docker/centos7
diff options
context:
space:
mode:
Diffstat (limited to 'ci/docker/centos7')
-rw-r--r--ci/docker/centos77
1 files changed, 6 insertions, 1 deletions
diff --git a/ci/docker/centos7 b/ci/docker/centos7
index 8105f1442..28ed65081 100644
--- a/ci/docker/centos7
+++ b/ci/docker/centos7
@@ -48,7 +48,12 @@ RUN cd /tmp && \
rm -rf cmake-3.21.1
FROM cmake AS adduser
-RUN useradd --shell /bin/bash libgit2 --create-home
+ARG UID=""
+ARG GID=""
+RUN if [ "${UID}" != "" ]; then USER_ARG="--uid ${UID}"; fi && \
+ if [ "${GID}" != "" ]; then GROUP_ARG="--gid ${GID}"; fi && \
+ groupadd ${GROUP_ARG} libgit2 && \
+ useradd ${USER_ARG} --gid libgit2 --shell /bin/bash --create-home libgit2
FROM adduser AS configure
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig