blob: 161f286032e8cebfa65aae09e1b570a751dda95a [file] [log] [blame]
Nico Hubera1a296f2023-06-25 10:07:07 +00001FROM gerritcodereview/gerrit:3.8.0
2
3COPY --from=sourcearcade-nginx /etc/ssl/certs/sa-selfsigned.crt /var/gerrit/etc/
4RUN \
5 keytool -importcert -alias sa-selfsigned -file /var/gerrit/etc/sa-selfsigned.crt \
6 -keystore /var/gerrit/truststore -storepass uiaeuiae -noprompt && \
7 rm /var/gerrit/etc/sa-selfsigned.crt
8RUN \
9 echo | keytool -importkeystore \
10 -srckeystore /usr/lib/jvm/java-*/lib/security/cacerts \
11 -destkeystore /var/gerrit/truststore \
12 -deststorepass uiaeuiae -noprompt
13
14USER root
15RUN \
16 printf 'JAVA_OPTIONS="%s %s"\n' \
17 -Djavax.net.ssl.trustStore=/var/gerrit/truststore \
18 -Djavax.net.ssl.trustStorePassword=uiaeuiae >>/etc/default/gerritcodereview
19
20COPY gerrit/Dockerfile.entrypoint /privileged.sh
21RUN chmod 544 /privileged.sh
22COPY gerrit/Dockerfile.entrypoint-unprivileged /unprivileged.sh
23RUN chmod 555 /unprivileged.sh
24
25ENTRYPOINT ["/bin/sh", "/privileged.sh"]