From 3b48ad0def7e5fa2cd801be1114324fd6c674953 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 26 Oct 2019 08:21:11 +0900 Subject: [PATCH] Fix gerrit execution path Java is in /usr/local in these base images. Also, combining ENTRYPOINT and CMD with [] syntax seems to lead to the whole thing with [ getting passed to the entrypoint - which leads to errors like: /bin/sh: 1: [/usr/bin/java,: not found Change-Id: I7c1ebdff58d6590724eaf5d429437a5c8c25fe22 --- docker/gerrit/2.13/Dockerfile | 2 +- docker/gerrit/base/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/gerrit/2.13/Dockerfile b/docker/gerrit/2.13/Dockerfile index 00e5ae1294..0f1f595b0b 100644 --- a/docker/gerrit/2.13/Dockerfile +++ b/docker/gerrit/2.13/Dockerfile @@ -65,4 +65,4 @@ ENV JAVA_OPTIONS "" # Ulimits should be set on command line or in docker-compose.yaml ENTRYPOINT ["/usr/bin/dumb-init", "--"] -CMD ["/usr/bin/java", ${JAVA_OPTIONS}, "-jar", "/var/gerrit/bin/gerrit.war"] +CMD /usr/local/openjdk-8/bin/java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit diff --git a/docker/gerrit/base/Dockerfile b/docker/gerrit/base/Dockerfile index ee997bfd52..5e5ef44918 100644 --- a/docker/gerrit/base/Dockerfile +++ b/docker/gerrit/base/Dockerfile @@ -59,4 +59,4 @@ ENV JAVA_OPTIONS "" # Ulimits should be set on command line or in docker-compose.yaml ENTRYPOINT ["/usr/bin/dumb-init", "--"] -CMD ["/usr/local/openjdk-8/bin/java", ${JAVA_OPTIONS}, "-jar", "/var/gerrit/bin/gerrit.war", "daemon", "-d", "/var/gerrit"] +CMD /usr/local/openjdk-8/bin/java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon -d /var/gerrit