Skip to content

Commit

Permalink
.NET auto-instrumentation include musl in docker image (#2087)
Browse files Browse the repository at this point in the history
* [.NET AutoInstrumentation] Docker image includes musl library

* Replace ADD by get command

* Remove redundant files from docker image

* Execute all commands in one layer

* Fix passing arguments

* revert to ADD as wget is failing on CI

* Typo fix

Co-authored-by: Paulo Janotti <[email protected]>

---------

Co-authored-by: Paulo Janotti <[email protected]>
  • Loading branch information
Kielek and pjanotti authored Sep 7, 2023
1 parent 4d978d4 commit a43879e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions autoinstrumentation/dotnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# - Following environment variables are injected to the application container to enable the auto-instrumentation.
# CORECLR_ENABLE_PROFILING=1
# CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318}
# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so
# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so # for glibc based images
# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so # for musl based images
# DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps
# DOTNET_SHARED_STORE=%InstallationLocation%/store
# DOTNET_STARTUP_HOOKS=%InstallationLocation%/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll
Expand All @@ -20,7 +21,9 @@ ARG version
WORKDIR /autoinstrumentation

ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-glibc.zip .
ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-musl.zip .

RUN unzip opentelemetry-dotnet-instrumentation-linux-glibc.zip

RUN chmod -R go+r .
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 .

0 comments on commit a43879e

Please sign in to comment.