Nico Huber | a1a296f | 2023-06-25 10:07:07 +0000 | [diff] [blame^] | 1 | FROM gerritcodereview/gerrit:3.8.0 |
| 2 | |
| 3 | COPY --from=sourcearcade-nginx /etc/ssl/certs/sa-selfsigned.crt /var/gerrit/etc/ |
| 4 | RUN \ |
| 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 |
| 8 | RUN \ |
| 9 | echo | keytool -importkeystore \ |
| 10 | -srckeystore /usr/lib/jvm/java-*/lib/security/cacerts \ |
| 11 | -destkeystore /var/gerrit/truststore \ |
| 12 | -deststorepass uiaeuiae -noprompt |
| 13 | |
| 14 | USER root |
| 15 | RUN \ |
| 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 | |
| 20 | COPY gerrit/Dockerfile.entrypoint /privileged.sh |
| 21 | RUN chmod 544 /privileged.sh |
| 22 | COPY gerrit/Dockerfile.entrypoint-unprivileged /unprivileged.sh |
| 23 | RUN chmod 555 /unprivileged.sh |
| 24 | |
| 25 | ENTRYPOINT ["/bin/sh", "/privileged.sh"] |