Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Set Gerrit to 2.14.15
Change-Id: Iaecdd6a3d2834884576513dab232bc53b945db8b
diff --git a/README.md b/README.md
index 3094744..da3b2ec 100644
--- a/README.md
+++ b/README.md
@@ -39,14 +39,14 @@
services:
gerrit:
image: gerritcodereview/gerrit
- volumes:
- - git-volume:/var/gerrit/git
- - db-volume:/var/gerrit/db
- - index-volume:/var/gerrit/index
- - cache-volume:/var/gerrit/cache
- ports:
- - "29418:29418"
- - "8080:8080"
+ volumes:
+ - git-volume:/var/gerrit/git
+ - db-volume:/var/gerrit/db
+ - index-volume:/var/gerrit/index
+ - cache-volume:/var/gerrit/cache
+ ports:
+ - "29418:29418"
+ - "8080:8080"
volumes:
git-volume:
diff --git a/centos/7/Dockerfile b/centos/7/Dockerfile
index 92f1430..b531a93 100644
--- a/centos/7/Dockerfile
+++ b/centos/7/Dockerfile
@@ -1,4 +1,4 @@
-FROM centos:7.3.1611
+FROM centos:7.4.1708
MAINTAINER Gerrit Code Review Community
RUN yum -y install initscripts sudo
@@ -9,17 +9,21 @@
# Install OpenJDK and Gerrit in two subsequent transactions
# (pre-trans Gerrit script needs to have access to the Java command)
RUN yum -y install java-1.8.0-openjdk
-RUN yum -y install gerrit-2.14.15
+RUN yum -y install gerrit-2.15.4-1 && rm -f /var/gerrit/logs/*
USER gerrit
RUN java -jar /var/gerrit/bin/gerrit.war init --batch --install-all-plugins -d /var/gerrit
RUN java -jar /var/gerrit/bin/gerrit.war reindex -d /var/gerrit
RUN git config -f /var/gerrit/etc/gerrit.config container.javaOptions "-Djava.security.egd=file:/dev/./urandom"
+ENV CANONICAL_WEB_URL=
+
# Allow incoming traffic
EXPOSE 29418 8080
VOLUME ["/var/gerrit/git", "/var/gerrit/index", "/var/gerrit/cache", "/var/gerrit/db", "/var/gerrit/etc"]
# Start Gerrit
-CMD /var/gerrit/bin/gerrit.sh start && tail -f /var/gerrit/logs/error_log
+CMD git config -f /var/gerrit/etc/gerrit.config gerrit.canonicalWebUrl "${CANONICAL_WEB_URL:-http://$HOSTNAME:8080/}" && \
+ git config -f /var/gerrit/etc/gerrit.config noteDb.changes.autoMigrate true && \
+ /var/gerrit/bin/gerrit.sh run
diff --git a/ubuntu/16/Dockerfile b/ubuntu/16/Dockerfile
index a56d015..aa7a545 100644
--- a/ubuntu/16/Dockerfile
+++ b/ubuntu/16/Dockerfile
@@ -12,17 +12,21 @@
# Install OpenJDK and Gerrit in two subsequent transactions
# (pre-trans Gerrit script needs to have access to the Java command)
RUN apt-get -y install openjdk-8-jdk
-RUN apt-get -y install gerrit=2.14.15-1 && rm -f /var/gerrit/logs/*
+RUN apt-get -y install gerrit=2.15.4-1 && rm -f /var/gerrit/logs/*
USER gerrit
RUN java -jar /var/gerrit/bin/gerrit.war init --batch --install-all-plugins -d /var/gerrit
RUN java -jar /var/gerrit/bin/gerrit.war reindex -d /var/gerrit
RUN git config -f /var/gerrit/etc/gerrit.config container.javaOptions "-Djava.security.egd=file:/dev/./urandom"
+ENV CANONICAL_WEB_URL=
+
# Allow incoming traffic
EXPOSE 29418 8080
VOLUME ["/var/gerrit/git", "/var/gerrit/index", "/var/gerrit/cache", "/var/gerrit/db", "/var/gerrit/etc"]
# Start Gerrit
-CMD /var/gerrit/bin/gerrit.sh start && tail -f /var/gerrit/logs/error_log
+CMD git config -f /var/gerrit/etc/gerrit.config gerrit.canonicalWebUrl "${CANONICAL_WEB_URL:-http://$HOSTNAME:8080/}" && \
+ git config -f /var/gerrit/etc/gerrit.config noteDb.changes.autoMigrate true && \
+ /var/gerrit/bin/gerrit.sh run