From d97efb906d2f34ce90c2f46e69213aed577c9701 Mon Sep 17 00:00:00 2001 From: Brandon Pfeifer <bpfeifer@influxdata.com> Date: Tue, 15 Apr 2025 10:34:27 -0400 Subject: [PATCH] fix(influxdb3-core, influxdb3-enterprise): allow running of arbitrary shell commands --- influxdb3-core/3.0/Dockerfile | 3 ++- influxdb3-core/3.0/entrypoint.sh | 2 +- influxdb3-enterprise/3.0/Dockerfile | 3 ++- influxdb3-enterprise/3.0/entrypoint.sh | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/influxdb3-core/3.0/Dockerfile b/influxdb3-core/3.0/Dockerfile index c4a5e79..e485724 100644 --- a/influxdb3-core/3.0/Dockerfile +++ b/influxdb3-core/3.0/Dockerfile @@ -33,6 +33,7 @@ RUN case "$(dpkg --print-architecture)" in \ "influxdb3-core-${INFLUXDB_VERSION}_linux_${ARCH}.tar.gz" && \ # Install InfluxDB3 Core \ tar --strip-components 1 -C /usr/lib/influxdb3 -xvf "influxdb3-core-${INFLUXDB_VERSION}_linux_${ARCH}.tar.gz" && \ + mv /usr/lib/influxdb3/influxdb3 /usr/bin/influxdb3 && \ chown -R influxdb3:influxdb3 /var/lib/influxdb3 /plugins && \ chown -R root:root /usr/lib/influxdb3 && \ # Cleanup \ @@ -52,4 +53,4 @@ ENV LOG_FILTER=info EXPOSE 8181 ENTRYPOINT ["/usr/bin/entrypoint.sh"] -CMD ["serve"] +CMD ["influxdb3", "serve"] diff --git a/influxdb3-core/3.0/entrypoint.sh b/influxdb3-core/3.0/entrypoint.sh index f526237..ab2af86 100755 --- a/influxdb3-core/3.0/entrypoint.sh +++ b/influxdb3-core/3.0/entrypoint.sh @@ -6,4 +6,4 @@ for i in "${!args[@]}"; do args[${i}]="$(echo "${args[${i}]}" | envsubst)" done -exec /usr/lib/influxdb3/influxdb3 "${args[@]}" +exec "${args[@]}" diff --git a/influxdb3-enterprise/3.0/Dockerfile b/influxdb3-enterprise/3.0/Dockerfile index 9a147fe..ef39bdd 100644 --- a/influxdb3-enterprise/3.0/Dockerfile +++ b/influxdb3-enterprise/3.0/Dockerfile @@ -33,6 +33,7 @@ RUN case "$(dpkg --print-architecture)" in \ "influxdb3-enterprise-${INFLUXDB_VERSION}_linux_${ARCH}.tar.gz" && \ # Install InfluxDB3 Enterprise \ tar --strip-components 1 -C /usr/lib/influxdb3 -xvf "influxdb3-enterprise-${INFLUXDB_VERSION}_linux_${ARCH}.tar.gz" && \ + mv /usr/lib/influxdb3/influxdb3 /usr/bin/influxdb3 && \ chown -R influxdb3:influxdb3 /var/lib/influxdb3 /plugins && \ chown -R root:root /usr/lib/influxdb3 && \ # Cleanup \ @@ -52,4 +53,4 @@ ENV LOG_FILTER=info EXPOSE 8181 ENTRYPOINT ["/usr/bin/entrypoint.sh"] -CMD ["serve"] +CMD ["influxdb3", "serve"] diff --git a/influxdb3-enterprise/3.0/entrypoint.sh b/influxdb3-enterprise/3.0/entrypoint.sh index f526237..ab2af86 100755 --- a/influxdb3-enterprise/3.0/entrypoint.sh +++ b/influxdb3-enterprise/3.0/entrypoint.sh @@ -6,4 +6,4 @@ for i in "${!args[@]}"; do args[${i}]="$(echo "${args[${i}]}" | envsubst)" done -exec /usr/lib/influxdb3/influxdb3 "${args[@]}" +exec "${args[@]}" -- GitLab