blob: 6e8e825f6f7085151e84c87e4cde2e6e4671a8a1 [file] [log] [blame]
FROM alpine:3.11
ARG UID=1000
ARG GID=1000
ENV USER gerrit_admin
ENV USER_HOME /home/$USER
ENV WORKSPACE $USER_HOME/workspace
RUN apk --update add --no-cache openssh bash git util-linux openssl shadow curl
RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
RUN groupadd -f -g $GID users2
RUN useradd -u $UID -g $GID $USER
RUN mkdir -p $WORKSPACE $USER_HOME/.ssh
RUN chown -R $USER $USER_HOME
USER $USER
RUN ssh-keygen -P '' -f "$USER_HOME"/.ssh/id_rsa
RUN chmod 400 "$USER_HOME"/.ssh/id_rsa
RUN git config --global user.name "Gerrit Admin"
RUN git config --global user.email "gerrit_admin@example.com"
ENTRYPOINT ["tail", "-f", "/dev/null"]