Skip to content
8 changes: 6 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM --platform=$BUILDPLATFORM dhi.io/dotnet:10.0.101-sdk-alpine3.22 AS builder
# https://mcr.microsoft.com/product/dotnet/sdk
# https://mcr.microsoft.com/v2/dotnet/sdk/tags/list
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.101-azurelinux3.0 AS builder
ARG TARGETARCH
WORKDIR /app
COPY my-sample-app.csproj .
Expand All @@ -11,7 +13,9 @@ RUN dotnet publish my-sample-app.csproj \
-o /my-sample-app \
--no-restore

FROM dhi.io/dotnet:10.0.1-alpine3.22
# https://mcr.microsoft.com/product/dotnet/runtime
# https://mcr.microsoft.com/v2/dotnet/runtime/tags/list
FROM mcr.microsoft.com/dotnet/runtime:10.0.1-azurelinux3.0-distroless-extra
WORKDIR /app
COPY --from=builder /my-sample-app .
EXPOSE 8080
Expand Down