Skip to content

Commit e699025

Browse files
committed
use a base image with .NET 9 installed
1 parent d6d97f2 commit e699025

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

packaging/tests/deb/dotnet/Dockerfile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN dotnet build "DotNetTestApp.csproj" -c Release -o /app/build
88
FROM build AS publish
99
RUN dotnet publish "DotNetTestApp.csproj" -c Release -o /app/publish
1010

11-
FROM debian:12 AS final
11+
FROM mcr.microsoft.com/dotnet/runtime:9.0-bookworm-slim AS final
1212

1313
ARG ARCH=amd64
1414
ARG RPM_ARCH=x86_64
@@ -18,14 +18,6 @@ ENV LANG=C.UTF-8
1818
RUN apt-get update
1919
RUN apt install -y wget
2020

21-
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
22-
dpkg -i packages-microsoft-prod.deb && \
23-
rm packages-microsoft-prod.deb
24-
25-
RUN apt-get update
26-
27-
RUN apt-get install -y dotnet-runtime-9.0 dotnet-sdk-9.0
28-
2921
# TODO The otel collector version needs to be kept up to date, potentially with renovate.
3022
RUN wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.128.0/otelcol-contrib_0.128.0_linux_${ARCH}.deb
3123
RUN dpkg -i otelcol-contrib_0.128.0_linux_${ARCH}.deb

0 commit comments

Comments
 (0)