| MAINTAINER Gerrit Code Review Community |
| # Add Gerrit packages repository |
| RUN rpm -i https://gerritforge.com/gerritforge-repo-1-4.noarch.rpm |
| # Install OS pre-prequisites, OpenJDK and Gerrit in two subsequent transactions |
| # (pre-trans Gerrit script needs to have access to the Java command) |
| RUN yum -y install initscripts && \ |
| yum -y install java-17-openjdk && \ |
| yum -y install gerrit-3.9.8-1 && \ |
| rm -f /var/gerrit/etc/{ssh,secure}* && rm -Rf /var/gerrit/{static,index,logs,data,index,cache,git,db,tmp}/* && chown -R gerrit:gerrit /var/gerrit && \ |
| # Enable LEGACY security policies by default (for TLS 1.0/1.1 compatibility) |
| RUN update-crypto-policies --set LEGACY |
| VOLUME ["/var/gerrit/git", "/var/gerrit/index", "/var/gerrit/cache", "/var/gerrit/db", "/var/gerrit/etc"] |
| ENTRYPOINT ["/entrypoint.sh"] |