File tree Expand file tree Collapse file tree 5 files changed +9
-23
lines changed
Expand file tree Collapse file tree 5 files changed +9
-23
lines changed Original file line number Diff line number Diff line change 1- FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
1+ ARG ARCH=amd64
2+
3+ FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim-${ARCH}
4+
5+ ENV LANG=C.UTF-8
6+
27WORKDIR /src
38COPY "packaging/tests/shared/dotnet/DotNetTestApp.csproj" .
49RUN dotnet restore "DotNetTestApp.csproj"
510COPY "packaging/tests/shared/dotnet/*.cs" .
6- RUN dotnet build "DotNetTestApp.csproj" -c Release -o /app/build
11+ RUN dotnet build "DotNetTestApp.csproj" -c Release -o /app/build -r linux-${ARCH}
712
8- FROM build AS publish
9- RUN dotnet publish "DotNetTestApp.csproj" -c Release -o /app/publish
10-
11- FROM mcr.microsoft.com/dotnet/aspnet:9.0-bookworm-slim AS final
12-
13- ARG ARCH=amd64
14- ARG RPM_ARCH=x86_64
15-
16- ENV LANG=C.UTF-8
13+ RUN dotnet publish "DotNetTestApp.csproj" -c Release -o /app/publish -r linux-${ARCH}
1714
1815RUN apt-get update
1916RUN apt install -y wget
@@ -28,7 +25,7 @@ RUN dpkg -i injector.deb
2825
2926RUN echo /usr/lib/opentelemetry/libotelinject.so >> /etc/ld.so.preload
3027
31- COPY --from=publish /app/publish .
28+ RUN cp /app/publish/* .
3229COPY packaging/tests/shared/dotnet/test.sh test.sh
3330
3431CMD ["./test.sh" ]
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ set -euo pipefail
55arch=" ${ARCH:- amd64} "
66if [ " $arch " = arm64 ]; then
77 docker_platform=linux/arm64
8- rpm_arch=aarch64
98elif [ " $arch " = amd64 ]; then
109 docker_platform=linux/amd64
11- rpm_arch=x86_64
1210else
1311 echo " The architecture $arch is not supported."
1412 exit 1
@@ -20,7 +18,6 @@ cd $SCRIPT_DIR/../../../..
2018docker build \
2119 --platform " $docker_platform " \
2220 --build-arg " ARCH=$arch " \
23- --build-arg " RPM_ARCH=$rpm_arch " \
2421 -t " instrumentation-dotnet-$arch " \
2522 -f packaging/tests/deb/dotnet/Dockerfile \
2623 .
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ set -euo pipefail
55arch=" ${ARCH:- amd64} "
66if [ " $arch " = arm64 ]; then
77 docker_platform=linux/arm64
8- rpm_arch=aarch64
98elif [ " $arch " = amd64 ]; then
109 docker_platform=linux/amd64
11- rpm_arch=x86_64
1210else
1311 echo " The architecture $arch is not supported."
1412 exit 1
2624docker build \
2725 --platform " $docker_platform " \
2826 --build-arg " ARCH=$arch " \
29- --build-arg " RPM_ARCH=$rpm_arch " \
3027 --build-arg " tomcat_download_url=$tomcat_download_url " \
3128 -t " instrumentation-java-$arch " \
3229 -f packaging/tests/deb/java/Dockerfile \
Original file line number Diff line number Diff line change @@ -5,10 +5,8 @@ set -euo pipefail
55arch=" ${ARCH:- amd64} "
66if [ " $arch " = arm64 ]; then
77 docker_platform=linux/arm64
8- rpm_arch=aarch64
98elif [ " $arch " = amd64 ]; then
109 docker_platform=linux/amd64
11- rpm_arch=x86_64
1210else
1311 echo " The architecture $arch is not supported."
1412 exit 1
@@ -20,7 +18,6 @@ cd $SCRIPT_DIR/../../../..
2018docker build \
2119 --platform " $docker_platform " \
2220 --build-arg " ARCH=$arch " \
23- --build-arg " RPM_ARCH=$rpm_arch " \
2421 -t " instrumentation-nodejs-$arch " \
2522 -f packaging/tests/deb/nodejs/Dockerfile \
2623 .
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- ls -lah *
4-
53dotnet DotNetTestApp.dll &
64
75# If the .NET process is instrumented successfully, we should see a log report:
You can’t perform that action at this time.
0 commit comments