Skip to content

Commit

Permalink
arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-benoit authored Jun 18, 2024
1 parent c40106e commit 2ea7890
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# https://mcr.microsoft.com/product/dotnet/sdk
# https://mcr.microsoft.com/v2/dotnet/sdk/tags/list
FROM mcr.microsoft.com/dotnet/nightly/sdk:8.0.302-noble-aot as builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/nightly/sdk:8.0.302-noble-aot as builder
ARG TARGETARCH
WORKDIR /app
COPY my-sample-app.csproj .
RUN dotnet restore my-sample-app.csproj \
-r linux-x64
-a $TARGETARCH
COPY . .
RUN dotnet publish my-sample-app.csproj \
-r linux-x64 \
-a $TARGETARCH \
-c release \
-o /my-sample-app \
--no-restore \
Expand All @@ -17,7 +18,7 @@ RUN dotnet publish my-sample-app.csproj \

# https://mcr.microsoft.com/product/dotnet/runtime-deps
# https://mcr.microsoft.com/v2/dotnet/runtime-deps/tags/list
FROM mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0.6-noble-chiseled-aot
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/nightly/runtime-deps:8.0.6-noble-chiseled-aot
WORKDIR /app
COPY --from=builder /my-sample-app .
EXPOSE 8080
Expand Down

0 comments on commit 2ea7890

Please sign in to comment.