Skip to content

Commit b16c698

Browse files
committed
wip
1 parent 36712b4 commit b16c698

File tree

5 files changed

+9
-23
lines changed

5 files changed

+9
-23
lines changed
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
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+
27
WORKDIR /src
38
COPY "packaging/tests/shared/dotnet/DotNetTestApp.csproj" .
49
RUN dotnet restore "DotNetTestApp.csproj"
510
COPY "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

1815
RUN apt-get update
1916
RUN apt install -y wget
@@ -28,7 +25,7 @@ RUN dpkg -i injector.deb
2825

2926
RUN echo /usr/lib/opentelemetry/libotelinject.so >> /etc/ld.so.preload
3027

31-
COPY --from=publish /app/publish .
28+
RUN cp /app/publish/* .
3229
COPY packaging/tests/shared/dotnet/test.sh test.sh
3330

3431
CMD ["./test.sh"]

packaging/tests/deb/dotnet/run.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ set -euo pipefail
55
arch="${ARCH:-amd64}"
66
if [ "$arch" = arm64 ]; then
77
docker_platform=linux/arm64
8-
rpm_arch=aarch64
98
elif [ "$arch" = amd64 ]; then
109
docker_platform=linux/amd64
11-
rpm_arch=x86_64
1210
else
1311
echo "The architecture $arch is not supported."
1412
exit 1
@@ -20,7 +18,6 @@ cd $SCRIPT_DIR/../../../..
2018
docker 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
.

packaging/tests/deb/java/run.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ set -euo pipefail
55
arch="${ARCH:-amd64}"
66
if [ "$arch" = arm64 ]; then
77
docker_platform=linux/arm64
8-
rpm_arch=aarch64
98
elif [ "$arch" = amd64 ]; then
109
docker_platform=linux/amd64
11-
rpm_arch=x86_64
1210
else
1311
echo "The architecture $arch is not supported."
1412
exit 1
@@ -26,7 +24,6 @@ fi
2624
docker 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 \

packaging/tests/deb/nodejs/run.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ set -euo pipefail
55
arch="${ARCH:-amd64}"
66
if [ "$arch" = arm64 ]; then
77
docker_platform=linux/arm64
8-
rpm_arch=aarch64
98
elif [ "$arch" = amd64 ]; then
109
docker_platform=linux/amd64
11-
rpm_arch=x86_64
1210
else
1311
echo "The architecture $arch is not supported."
1412
exit 1
@@ -20,7 +18,6 @@ cd $SCRIPT_DIR/../../../..
2018
docker 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
.

packaging/tests/shared/dotnet/test.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
ls -lah *
4-
53
dotnet DotNetTestApp.dll &
64

75
# If the .NET process is instrumented successfully, we should see a log report:

0 commit comments

Comments
 (0)