From da3f449d41f3abe85217c66adfc402dd1fc0d992 Mon Sep 17 00:00:00 2001 From: Ron Federman <73110295+RonFed@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:30:02 +0300 Subject: [PATCH] Use a specific tag of busybox to avoid un-determinstic builds (#1410) --- odiglet/Dockerfile | 2 +- odiglet/debug.Dockerfile | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/odiglet/Dockerfile b/odiglet/Dockerfile index f6462bf57..d9d4afc13 100644 --- a/odiglet/Dockerfile +++ b/odiglet/Dockerfile @@ -52,7 +52,7 @@ RUN yarn compile -FROM busybox AS dotnet-builder +FROM busybox:1.36.1 AS dotnet-builder WORKDIR /dotnet-instrumentation ARG DOTNET_OTEL_VERSION=v1.7.0 ARG TARGETARCH diff --git a/odiglet/debug.Dockerfile b/odiglet/debug.Dockerfile index 556893202..cc6805583 100644 --- a/odiglet/debug.Dockerfile +++ b/odiglet/debug.Dockerfile @@ -8,11 +8,20 @@ WORKDIR /nodejs-instrumentation COPY odiglet/agents/nodejs . RUN npm install -FROM busybox AS dotnet-builder +FROM busybox:1.36.1 AS dotnet-builder WORKDIR /dotnet-instrumentation -ARG DOTNET_OTEL_VERSION=v0.7.0 -ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/$DOTNET_OTEL_VERSION/opentelemetry-dotnet-instrumentation-linux-musl.zip . -RUN unzip opentelemetry-dotnet-instrumentation-linux-musl.zip && rm opentelemetry-dotnet-instrumentation-linux-musl.zip +ARG DOTNET_OTEL_VERSION=v1.7.0 +ARG TARGETARCH +RUN if [ "$TARGETARCH" = "arm64" ]; then \ + echo "arm64" > /tmp/arch_suffix; \ + else \ + echo "x64" > /tmp/arch_suffix; \ + fi + +RUN ARCH_SUFFIX=$(cat /tmp/arch_suffix) && \ + wget https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/${DOTNET_OTEL_VERSION}/opentelemetry-dotnet-instrumentation-linux-glibc-${ARCH_SUFFIX}.zip && \ + unzip opentelemetry-dotnet-instrumentation-linux-glibc-${ARCH_SUFFIX}.zip && \ + rm opentelemetry-dotnet-instrumentation-linux-glibc-${ARCH_SUFFIX}.zip FROM --platform=$BUILDPLATFORM keyval/odiglet-base:v1.5 as builder WORKDIR /go/src/github.com/odigos-io/odigos @@ -35,7 +44,7 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest WORKDIR /instrumentations # Java -ARG JAVA_OTEL_VERSION=v2.3.0 +ARG JAVA_OTEL_VERSION=v2.6.0 ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/$JAVA_OTEL_VERSION/opentelemetry-javaagent.jar /instrumentations/java/javaagent.jar RUN chmod 644 /instrumentations/java/javaagent.jar