forked from openfrontier/docker-gerrit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-app
More file actions
47 lines (34 loc) · 1.35 KB
/
Dockerfile-app
File metadata and controls
47 lines (34 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM adoptopenjdk/openjdk11:alpine-jre
MAINTAINER zsx <thinkernel@gmail.com>
# Overridable defaults
ENV GERRIT_HOME /var/gerrit
ENV GERRIT_SITE ${GERRIT_HOME}/review_site
ENV GERRIT_WAR ${GERRIT_HOME}/gerrit.war
ENV GERRIT_VERSION 3.8.0
ENV GERRIT_USER gerrit2
ENV GERRIT_INIT_ARGS "--install-plugin=delete-project --install-plugin=gitiles --install-plugin=plugin-manager"
# add nano
RUN apk add nano
# Add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN adduser -D -h "${GERRIT_HOME}" -g "Gerrit User" -s /sbin/nologin "${GERRIT_USER}"
RUN set -x \
&& apk add --update --no-cache git openssh-client openssl bash perl perl-cgi git-gitweb curl su-exec
RUN mkdir /docker-entrypoint-init.d
#Download gerrit.war
RUN curl -fSsL https://gerrit-releases.storage.googleapis.com/gerrit-${GERRIT_VERSION}.war -o $GERRIT_WAR
# Ensure the entrypoint scripts are in a fixed location
COPY gerrit-entrypoint.sh /
COPY gerrit-start.sh /
RUN chmod +x /gerrit*.sh
# set our timezone
RUN apk add tzdata && \
cp /usr/share/zoneinfo/Pacific/Auckland /etc/localtime && \
echo "Pacific/Auckland" > /etc/timezone && \
apk del tzdata
# here we keep our backups
RUN mkdir /backup
# here we restore from
RUN mkdir /restore
ENTRYPOINT ["/gerrit-entrypoint.sh"]
EXPOSE 8080 29418
CMD ["/gerrit-start.sh"]