From 0e85162b5014cabe318ccd4daf52d83aed98f5a0 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Tue, 21 Jan 2025 15:59:59 +0000 Subject: [PATCH] fix: update architecture detection syntax in Dockerfile.tpl for compatibility --- OTelCollector/Dockerfile.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OTelCollector/Dockerfile.tpl b/OTelCollector/Dockerfile.tpl index c3c605a6b3..4a77ae13d3 100644 --- a/OTelCollector/Dockerfile.tpl +++ b/OTelCollector/Dockerfile.tpl @@ -8,9 +8,9 @@ RUN apt-get update && apt-get install -y curl bash wget # Install gomplate RUN ARCHITECTURE=$(uname -m) -RUN if [[ $ARCHITECTURE == "aarch64" ]]; then \ +RUN if [ $ARCHITECTURE = "aarch64" ]; then \ ARCHITECTURE="arm64"; \ - elif [[ $ARCHITECTURE == "x86_64" ]]; then \ + elif [ $ARCHITECTURE = "x86_64" ]; then \ ARCHITECTURE="amd64"; \ fi && \ echo "ARCHITECTURE: $(uname -s) $ARCHITECTURE" @@ -21,13 +21,13 @@ RUN chmod 755 /usr/local/bin/gomplate # Install the collector RUN ARCHITECTURE=$(uname -m) -RUN if [[ $ARCHITECTURE == "aarch64" ]]; then \ +RUN if [ $ARCHITECTURE = "aarch64" ]; then \ wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v$COLLECTOR_VERSION/otelcol_$COLLECTOR_VERSION_linux_arm64.deb && \ dpkg -i otelcol_$COLLECTOR_VERSION_linux_arm64.deb; \ - elif [[ $ARCHITECTURE == "x86_64" ]]; then \ + elif [ $ARCHITECTURE = "x86_64" ]; then \ wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v$COLLECTOR_VERSION/otelcol_$COLLECTOR_VERSION_linux_amd64.deb && \ dpkg -i otelcol_$COLLECTOR_VERSION_linux_amd64.deb; \ - elif [[ $ARCHITECTURE == "i386" ]]; then \ + elif [ $ARCHITECTURE = "i386" ]; then \ wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v$COLLECTOR_VERSION/otelcol_$COLLECTOR_VERSION_linux_386.deb && \ dpkg -i otelcol_$COLLECTOR_VERSION_linux_386.deb; \ fi