Download Gerrit war-file outside of the Gerrit site

The Gerrit war-file was downloaded into the Gerrit-site. This would not
allow to persist the whole site, since volume mounts would overwrite the
site.

This change changes the download location, but sets a symlink to the old
position for compatibility reasons. A Gerrit init running on the
war-file should copy it to the site/bin folder. This way, the Gerrit
war-file should be callable, even if the site is overwritten by a volume
mount not containing it.

Change-Id: I7f5f412ac0d13444c687e23652a16e099884902a
diff --git a/container-images/gerrit-base/Dockerfile b/container-images/gerrit-base/Dockerfile
index fa792ae..9eb60fc 100644
--- a/container-images/gerrit-base/Dockerfile
+++ b/container-images/gerrit-base/Dockerfile
@@ -4,10 +4,11 @@
 
 RUN mkdir -p /var/gerrit/bin
 RUN mkdir -p /var/gerrit/etc
+RUN mkdir -p /var/war
 
 # Download Gerrit release
 ARG GERRIT_WAR_URL=https://gerrit-ci.gerritforge.com/view/Gerrit/job/Gerrit-bazel-stable-2.16/lastSuccessfulBuild/artifact/gerrit/bazel-bin/release.war
-RUN curl -k -o /var/gerrit/bin/gerrit.war ${GERRIT_WAR_URL}
+RUN curl -k -o /var/war/gerrit.war ${GERRIT_WAR_URL} && ln -s /var/war/gerrit.war /var/gerrit/bin/gerrit.war
 
 ARG GERRIT_UID=1000
 RUN useradd gerrit -u $GERRIT_UID -g users
@@ -16,6 +17,7 @@
 EXPOSE 29418 8080
 
 RUN chown -R gerrit:users /var/gerrit
+RUN chown -R gerrit:users /var/war
 USER gerrit
 
 ENTRYPOINT ["/bin/bash", "/var/tools/start"]