| ARG TAG=latest | |
| FROM base:${TAG} | |
| # Install apache2 | |
| RUN apk update && \ | |
| apk add --no-cache \ | |
| apache2 \ | |
| apache2-ctl \ | |
| apache2-utils \ | |
| git-daemon && \ | |
| rm /etc/apache2/conf.d/default.conf && \ | |
| rm /etc/apache2/conf.d/info.conf | |
| # Configure git-http-backend | |
| COPY config/git-http-backend.conf /etc/apache2/conf.d/ | |
| COPY config/envvars /usr/sbin/envvars | |
| COPY config/httpd.conf /etc/apache2/httpd.conf | |
| COPY tools/start /var/tools/start | |
| COPY tools/project_admin.sh /var/cgi/project_admin.sh | |
| RUN mkdir -p /var/gerrit/git && \ | |
| chown -R gerrit:users /var/gerrit/git && \ | |
| chown -R gerrit:users /run/apache2 | |
| USER gerrit | |
| # Start | |
| ENTRYPOINT ["ash", "/var/tools/start"] |