From 73a2b72e07446158967c2d557945e65a7a1f0b7d Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Thu, 25 Feb 2021 11:42:13 -0700 Subject: [PATCH] Update Docker files due to hadolint (#1954) Hadolint introduced a new linting rule prohibiting using the same env var in it's definition. Move to a two step definition. Signed-off-by: Danno Ferrin --- docker/graalvm/Dockerfile | 4 +++- docker/openjdk-11/Dockerfile | 4 +++- docker/openjdk-latest/Dockerfile | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/graalvm/Dockerfile b/docker/graalvm/Dockerfile index addf60fe6c..29756489c9 100644 --- a/docker/graalvm/Dockerfile +++ b/docker/graalvm/Dockerfile @@ -25,7 +25,9 @@ ENV BESU_PID_PATH "/tmp/pid" ENV OTEL_RESOURCE_ATTRIBUTES="service.name=besu,service.version=$VERSION" -ENV PATH="/opt/besu/bin:${PATH}" +ENV OLDPATH="${PATH}" +ENV PATH="/opt/besu/bin:${OLDPATH}" + ENTRYPOINT ["besu"] HEALTHCHECK --start-period=5s --interval=5s --timeout=1s --retries=10 CMD bash -c "[ -f /tmp/pid ]" diff --git a/docker/openjdk-11/Dockerfile b/docker/openjdk-11/Dockerfile index 3207b03222..4f5cf3e82d 100644 --- a/docker/openjdk-11/Dockerfile +++ b/docker/openjdk-11/Dockerfile @@ -25,7 +25,9 @@ ENV BESU_PID_PATH "/tmp/pid" ENV OTEL_RESOURCE_ATTRIBUTES="service.name=besu,service.version=$VERSION" -ENV PATH="/opt/besu/bin:${PATH}" +ENV OLDPATH="${PATH}" +ENV PATH="/opt/besu/bin:${OLDPATH}" + ENTRYPOINT ["besu"] HEALTHCHECK --start-period=5s --interval=5s --timeout=1s --retries=10 CMD bash -c "[ -f /tmp/pid ]" diff --git a/docker/openjdk-latest/Dockerfile b/docker/openjdk-latest/Dockerfile index c5adeab64a..02af8c3089 100644 --- a/docker/openjdk-latest/Dockerfile +++ b/docker/openjdk-latest/Dockerfile @@ -25,7 +25,9 @@ ENV BESU_PID_PATH "/tmp/pid" ENV OTEL_RESOURCE_ATTRIBUTES="service.name=besu,service.version=$VERSION" -ENV PATH="/opt/besu/bin:${PATH}" +ENV OLDPATH="${PATH}" +ENV PATH="/opt/besu/bin:${OLDPATH}" + ENTRYPOINT ["besu"] HEALTHCHECK --start-period=5s --interval=5s --timeout=1s --retries=10 CMD bash -c "[ -f /tmp/pid ]"