Skip to content

Commit

Permalink
.NET OTel AutoInstrumentation - multistage docker image build (#2680)
Browse files Browse the repository at this point in the history
to reduce image size
  • Loading branch information
Kielek authored Feb 28, 2024
1 parent f95596e commit 7b9298e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions autoinstrumentation/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# - For auto-instrumentation by container injection, the Linux command cp is
# used and must be availabe in the image.

FROM busybox
FROM busybox as downloader

ARG version

Expand All @@ -26,4 +26,8 @@ ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/relea
RUN unzip opentelemetry-dotnet-instrumentation-linux-glibc.zip &&\
unzip opentelemetry-dotnet-instrumentation-linux-musl.zip "linux-musl-x64/*" -d . &&\
rm opentelemetry-dotnet-instrumentation-linux-glibc.zip opentelemetry-dotnet-instrumentation-linux-musl.zip &&\
chmod -R go+r .
chmod -R go+r .

FROM busybox

COPY --from=downloader /autoinstrumentation /autoinstrumentation

0 comments on commit 7b9298e

Please sign in to comment.