Add Gerrit behind reverse-proxy
diff --git a/gerrit/Dockerfile b/gerrit/Dockerfile
new file mode 100644
index 0000000..161f286
--- /dev/null
+++ b/gerrit/Dockerfile
@@ -0,0 +1,25 @@
+FROM gerritcodereview/gerrit:3.8.0
+
+COPY --from=sourcearcade-nginx /etc/ssl/certs/sa-selfsigned.crt /var/gerrit/etc/
+RUN \
+ keytool -importcert -alias sa-selfsigned -file /var/gerrit/etc/sa-selfsigned.crt \
+ -keystore /var/gerrit/truststore -storepass uiaeuiae -noprompt && \
+ rm /var/gerrit/etc/sa-selfsigned.crt
+RUN \
+ echo | keytool -importkeystore \
+ -srckeystore /usr/lib/jvm/java-*/lib/security/cacerts \
+ -destkeystore /var/gerrit/truststore \
+ -deststorepass uiaeuiae -noprompt
+
+USER root
+RUN \
+ printf 'JAVA_OPTIONS="%s %s"\n' \
+ -Djavax.net.ssl.trustStore=/var/gerrit/truststore \
+ -Djavax.net.ssl.trustStorePassword=uiaeuiae >>/etc/default/gerritcodereview
+
+COPY gerrit/Dockerfile.entrypoint /privileged.sh
+RUN chmod 544 /privileged.sh
+COPY gerrit/Dockerfile.entrypoint-unprivileged /unprivileged.sh
+RUN chmod 555 /unprivileged.sh
+
+ENTRYPOINT ["/bin/sh", "/privileged.sh"]