Skip to content

Commit

Permalink
fix: update architecture detection syntax in Dockerfile.tpl for compa…
Browse files Browse the repository at this point in the history
…tibility
  • Loading branch information
simlarsen committed Jan 21, 2025
1 parent a5927f3 commit 0e85162
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions OTelCollector/Dockerfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 0e85162

Please sign in to comment.