Fixing dockerfile for Tutorial pubsub C# to be truly multi-arch (#1066)

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
This commit is contained in:
Paul Yuknewicz 2024-07-24 15:51:04 -07:00 committed by GitHub
parent 4f59e092bd
commit 0d9419509d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
# Use the official .NET 8 SDK image to build the application
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
# Copy the project file and restore dependencies
@ -11,7 +11,7 @@ COPY . ./
RUN dotnet publish -c Release -o out
# Use the official .NET 8 runtime image to run the application
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=build /app/out .