create user context in which to run tests

This commit is contained in:
Mike Greiling 2018-04-10 14:34:00 -05:00
parent e58d10ec07
commit acae4e06da
No known key found for this signature in database
GPG key ID: 0303DF507FA67596

View file

@ -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