From acae4e06dac8b72e943dd09f50b4dc6d03ff9285 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 10 Apr 2018 14:34:00 -0500 Subject: [PATCH] create user context in which to run tests --- Dockerfile.custom | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile.custom b/Dockerfile.custom index a7ab2de..1b1cbb9 100644 --- a/Dockerfile.custom +++ b/Dockerfile.custom @@ -43,6 +43,13 @@ RUN if [ -n "$INSTALL_GOLANG_VERSION" ] ; then /scripts/install-golang "${INSTAL ARG POSTGRES_VERSION RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql; fi +# Add a user and set up home dir +RUN groupadd --system gitlab && \ + useradd --system --create-home --gid gitlab --groups audio,video gitlab && \ + mkdir --parents /home/gitlab/reports && \ + chown --recursive gitlab:gitlab /home/gitlab + +USER gitlab RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8