blob: 4a1dfbbeb8dd555b0d595ddef7c1476bcd159249 [file] [log] [blame]
FROM gerritcodereview/gerrit:3.1.8
ENV GERRIT_BRANCH=stable-3.1
ENV GERRIT_CI_URL=https://gerrit-ci.gerritforge.com/job
USER root
RUN yum install -y iputils-ping netcat curl lsof gettext moreutils net-tools netcat inetutils-ping sudo
USER gerrit
ADD --chown=gerrit:gerrit $GERRIT_CI_URL/plugin-javamelody-bazel-$GERRIT_BRANCH/lastSuccessfulBuild/artifact/bazel-bin/plugins/javamelody/javamelody.jar /var/gerrit/plugins/javamelody.jar
ADD --chown=gerrit:gerrit $GERRIT_CI_URL/plugin-high-availability-bazel-$GERRIT_BRANCH/lastSuccessfulBuild/artifact/bazel-bin/plugins/high-availability/high-availability.jar /var/gerrit/plugins/high-availability.jar
USER root
ADD start.sh /bin/
ADD wait-for-it.sh /bin/
RUN rm -Rf /var/gerrit/{git,index,cache}/*
ARG GERRIT_UID=1000
RUN usermod -u ${GERRIT_UID} gerrit &> /dev/null
ENTRYPOINT ["/usr/bin/env"]
CMD /bin/start.sh